Allow -onlynet=onion to be used 244/head
authorsvost <ya.nowa@yandex.ru>
Thu, 1 Oct 2015 11:21:31 +0000 (14:21 +0300)
committersvost <ya.nowa@yandex.ru>
Thu, 1 Oct 2015 11:21:31 +0000 (14:21 +0300)
Just an alias for onlynet=tor, but matches the new name
of the proxy option -onion= better.

src/init.cpp
src/netbase.cpp

index 76f28e8..8ba1c61 100644 (file)
@@ -252,7 +252,7 @@ std::string HelpMessage()
         "  -connect=<ip>          " + _("Connect only to the specified node(s)") + "\n" +
         "  -seednode=<ip>         " + _("Connect to a node to retrieve peer addresses, and disconnect") + "\n" +
         "  -externalip=<ip>       " + _("Specify your own public address") + "\n" +
-        "  -onlynet=<net>         " + _("Only connect to nodes in network <net> (IPv4, IPv6 or Tor)") + "\n" +
+        "  -onlynet=<net>         " + _("Only connect to nodes in network <net> (IPv4, IPv6 or Onion)") + "\n" +
         "  -discover              " + _("Discover own IP address (default: 1 when listening and no -externalip)") + "\n" +
         "  -irc                   " + _("Find peers using internet relay chat (default: 1)") + "\n" +
         "  -listen                " + _("Accept connections from outside (default: 1 if no -proxy or -connect)") + "\n" +
index d5c4f92..08e8356 100644 (file)
@@ -39,7 +39,7 @@ enum Network ParseNetwork(std::string net) {
     boost::to_lower(net);
     if (net == "ipv4") return NET_IPV4;
     if (net == "ipv6") return NET_IPV6;
-    if (net == "tor")  return NET_TOR;
+    if (net == "tor" || net == "onoin")  return NET_TOR;
     if (net == "i2p")  return NET_I2P;
     return NET_UNROUTABLE;
 }