Changeset c949d77


Ignore:
Timestamp:
Feb 11, 2017 1:44:57 PM (4 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
fc8c193f
Parents:
e29e3e2
Message:

I2PTunnel CLI: Set connectDelay default for HTTP client
tweak clientoptions help messages

Location:
apps/i2ptunnel/java/src/net/i2p/i2ptunnel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnel.java

    re29e3e2 rc949d77  
    409409        } else if ("sockstunnel".equals(cmdname)) {
    410410            runSOCKSTunnel(args, l);
     411        } else if ("socksirctunnel".equals(cmdname)) {
     412            runSOCKSIRCTunnel(args, l);
    411413        } else if ("connectclient".equals(cmdname)) {
    412414            runConnectClient(args, l);
     
    477479              "  run <commandfile>\n" +
    478480              "  server <host> <port> <privkeyfile>\n" +
     481              "  socksirctunnel <port> [<sharedClient> [<privKeyFile>]]\n" +
     482              "  sockstunnel <port>\n" +
     483              "  streamrclient <host> <port> <destination>\n" +
     484              "  streamrserver <port> <privkeyfile>\n" +
    479485              "  textserver <host> <port> <privkey>\n");
    480486    }
     
    521527        } else {
    522528            l.log("Usage:\n" +
     529                  "  clientoptions                   // show help and list current options\n" +
    523530                  "  clientoptions [key=value ]*     // sets current options\n" +
    524531                  "  clientoptions -a [key=value ]*  // adds to current options\n" +
    525532                  "  clientoptions -c                // clears current options\n" +
    526533                  "  clientoptions -x [key ]*        // removes listed options\n" +
    527                   "Current options:\n");
     534                  "\nCurrent options:");
    528535            Properties p = new OrderedProperties();
    529536            p.putAll(_clientOptions);
     
    910917        } else {
    911918            l.log("client <port> <pubkey>[,<pubkey>]|file:<pubkeyfile>[ <sharedClient>] [<privKeyFile>]\n" +
    912                   "  creates a client that forwards port to the pubkey.\n"
    913                   + "  use 0 as port to get a free port assigned.  If you specify\n"
    914                   + "  a comma delimited list of pubkeys, it will rotate among them\n"
    915                   + "  randomlyl. sharedClient indicates if this client shares \n"
    916                   + "   with other clients (true of false)");
     919                    "  Creates a standard client that listens on the port and forwards to the pubkey.\n"
     920                  + "  With a comma delimited list of pubkeys, it will rotate among them randomly.\n"
     921                  + "  sharedClient indicates if this client shares tunnels with other clients (true or false)");
    917922            notifyEvent("clientTaskId", Integer.valueOf(-1));
    918923        }
     
    986991        } else {
    987992            l.log("httpclient <port> [<sharedClient>] [<proxy>]\n" +
    988                   "  creates a client that distributes HTTP requests.\n" +
    989                   "  <sharedClient> (optional) indicates if this client shares tunnels with other clients (true of false)\n" +
    990                   "  <proxy> (optional) indicates a proxy server to be used\n" +
     993                  "  Creates a HTTP client proxy on the specified port.\n" +
     994                  "  <sharedClient> (optional) Indicates if this client shares tunnels with other clients (true or false)\n" +
     995                  "  <proxy> (optional) Indicates a proxy server to be used\n" +
    991996                  "  when trying to access an address out of the .i2p domain");
    992997            notifyEvent("httpclientTaskId", Integer.valueOf(-1));
     
    10541059            l.log("connectclient <port> [<sharedClient>] [<proxy>]\n" +
    10551060                  "  creates a client that for SSL/HTTPS requests.\n" +
    1056                   "  <sharedClient> (optional) indicates if this client shares tunnels with other clients (true of false)\n" +
     1061                  "  <sharedClient> (optional) indicates if this client shares tunnels with other clients (true or false)\n" +
    10571062                  "  <proxy> (optional) indicates a proxy server to be used\n" +
    10581063                  "  when trying to access an address out of the .i2p domain\n");
     
    11201125        } else {
    11211126            l.log("ircclient <port> [<sharedClient> [<privKeyFile>]]\n" +
    1122                   "  creates a client that filter IRC protocol.\n" +
    1123                   "  <sharedClient> (optional) indicates if this client shares tunnels with other clients (true of false)\n");
     1127                  "  Creates an IRC client proxy on the specified port.\n" +
     1128                  "  <sharedClient> (optional) Indicates if this client shares tunnels with other clients (true or false)\n");
    11241129            notifyEvent("ircclientTaskId", Integer.valueOf(-1));
    11251130        }
     
    11741179        } else {
    11751180            l.log("sockstunnel <port>\n" +
    1176                   "  creates a tunnel that distributes SOCKS requests.");
     1181                  "  Creates a SOCKS proxy on the specified port.");
    11771182            notifyEvent("sockstunnelTaskId", Integer.valueOf(-1));
    11781183        }
     
    12221227        } else {
    12231228            l.log("socksirctunnel <port> [<sharedClient> [<privKeyFile>]]\n" +
    1224                   "  creates a tunnel for SOCKS IRC.");
     1229                  "  Creates a SOCKS IRC proxy on the specified port.");
    12251230            notifyEvent("sockstunnelTaskId", Integer.valueOf(-1));
    12261231        }
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java

    re29e3e2 rc949d77  
    221221        _proxyNonce = Long.toString(_context.random().nextLong());
    222222        // proxyList = new ArrayList();
     223        if (tunnel.getClientOptions().getProperty("i2p.streaming.connectDelay") == null)
     224            tunnel.getClientOptions().setProperty("i2p.streaming.connectDelay", "1000");
    223225
    224226        setName("HTTP Proxy on " + getTunnel().listenHost + ':' + localPort);
     
    247249            }
    248250        }
     251        if (tunnel.getClientOptions().getProperty("i2p.streaming.connectDelay") == null)
     252            tunnel.getClientOptions().setProperty("i2p.streaming.connectDelay", "1000");
    249253
    250254        setName("HTTP Proxy on " + tunnel.listenHost + ':' + localPort);
Note: See TracChangeset for help on using the changeset viewer.