Remove GetCharArg(). Organize CLI options file.

GetCharArg() was either a hack to keep from segfaulting when using
this botched option parser or it was old forgotten code - or both.

GetCharArg() was not needed because from_string() has std::string
overloaded and every GetCharArg() made its way to from_string().

Note: when using from_string() with std::string, it must be caught!
This commit is contained in:
anonimal 2015-11-14 16:13:08 +00:00
parent 1eff72d525
commit 5ae7e35e80
9 changed files with 60 additions and 46 deletions

View file

@ -1,38 +1,55 @@
Cmdline options
===============
CLI Options
===========
* --host= - The external IP (deprecated).
* --port= - The port to listen on
* --httpport= - The http port to listen on
* --httpaddress= - The ip address for the HTTP server, 127.0.0.1 by default
Basic
* --host= - The external IP (deprecated). Default: external interface.
* --port= - The port to listen on. Default: random (then saved to router.info).
* --httpport= - The HTTP port to listen on for WebUI. Default: 7070
* --httpaddress= - The IP address of the WebUI HTTP server. Default: 127.0.0.1
System
* --log= - Enable or disable logging to file. 1 for yes, 0 for no.
* --daemon= - Enable or disable daemon mode. 1 for yes, 0 for no.
* --service= - 1 if uses system folders (/var/run/i2pd.pid, /var/log/i2pd.log, /var/lib/i2pd).
* --v6= - 1 if supports communication through ipv6, off by default
* --floodfill= - 1 if router is floodfill, off by default
* --service= - 1 if using system folders (/var/run/i2pd.pid, /var/log/i2pd.log, /var/lib/i2pd).
Network
* --v6= - 1 to enable IPv6. Default: disabled.
* --floodfill= - 1 to enable router router as floodfill. Default: disabled.
* --bandwidth= - L if bandwidth is limited to 32Kbs/sec, O if not. Always O if floodfill, otherwise L by default.
* --httpproxyport= - The port to listen on (HTTP Proxy)
* --httpproxyaddress= - The address to listen on (HTTP Proxy)
* --socksproxyport= - The port to listen on (SOCKS Proxy)
* --socksproxyaddress= - The address to listen on (SOCKS Proxy)
* --proxykeys= - optional keys file for proxy's local destination
* --ircport= - The local port of IRC tunnel to listen on. 6668 by default
* --ircaddress= - The adddress of IRC tunnel to listen on, 127.0.0.1 by default
Proxies
* --httpproxyport= - The HTTP Proxy port to listen on. Default: 4446
* --httpproxyaddress= - The HTTP Proxy address to listen on. Default: 127.0.0.1
* --socksproxyport= - The SOCKS Proxy port to listen on. Default: 4447
* --socksproxyaddress= - The SOCKS Proxy address to listen on. Default: 127.0.0.1
* --proxykeys= - Optional keys file for proxy's local destination
IRC
* --ircport= - The local port of IRC tunnel to listen on. Default: 6668
* --ircaddress= - The adddress of IRC tunnel to listen on. Default: 127.0.0.1
* --ircdest= - I2P destination address of IRC server. For example irc.postman.i2p
* --irckeys= - optional keys file for tunnel's local destination
* --irckeys= - Optional keys file for tunnel's local destination.
Eepsite
* --eepkeys= - File name containing destination keys, for example privKeys.dat.
The file will be created if it does not already exist (issue #110).
* --eepaddress= - Address incoming trafic forward to. 127.0.0.1 by default
* --eepport= - Port incoming trafic forward to. 80 by default
* --samport= - Port of SAM bridge. Usually 7656. SAM is off if not specified
* --samaddress= - Address of SAM bridge, 127.0.0.1 by default (only used if SAM is on)
* --bobport= - Port of BOB command channel. Usually 2827. BOB is off if not specified
* --bobaddress= - Address of BOB service, 127.0.0.1 by default (only used if BOB is on)
* --i2pcontrolport= - Port of I2P control service. Usually 7650. I2PControl is off if not specified
* --i2pcontroladdress= - Address of I2P control service, 127.0.0.1 by default (only used if I2PControl is on)
* --i2pcontrolpassword= - I2P control service password, "itoopie" by default
* --tunnelscfg= - Tunnels Config file (default: ~/.i2pd/tunnels.cfg or /var/lib/i2pd/tunnels.cfg)
* --conf= - Config file (default: ~/.i2pd/i2p.conf or /var/lib/i2pd/i2p.conf)
* --eepaddress= - Forward incoming traffic to this address. Default: 127.0.0.1
* --eepport= - Forward incoming traffic to this port. Default: 80
API
* --samport= - Port of SAM bridge (usually 7656). Default: SAM is disabled if not specified.
* --samaddress= - Address of SAM bridge. Default: 127.0.0.1 (only used if SAM is enabled).
* --bobport= - Port of BOB command channel (usually 2827). BOB is disabled if not specified.
* --bobaddress= - Address of BOB service. Default: 127.0.0.1 (only used if BOB is enabled).
I2CP
* --i2pcontrolport= - Port of I2P control service (usually 7650). I2PControl is disabled if not specified.
* --i2pcontroladdress= - Address of I2P control service. Default: 127.0.0.1 (only used if I2PControl is enabled).
* --i2pcontrolpassword= - I2P control service password. Default: "itoopie" (without quotations).
Config
* --tunnelscfg= - Tunnels Config file. Default: ~/.i2pd/tunnels.cfg -or- /var/lib/i2pd/tunnels.cfg
* --conf= - Config file. Default: ~/.i2pd/i2p.conf -or- /var/lib/i2pd/i2p.conf
This parameter will be silently ignored if the specified config file does not exist.
Options specified on the command line take precedence over those in the config file.
* --install= - Installs the webui files, see BUILDING.md for details.
* --install= - Installs the WebUI (see doc/BUILDING.md for details).

View file

@ -10,7 +10,7 @@ i2p.conf:
v6 = 0
ircdest = irc.postman.i2p
tunnels.cfg (filename of this config is subject of change):
tunnels.cfg (filename of this config is subject to change):
; outgoing tunnel sample, to remote service
; mandatory parameters: