|
|
@ -60,10 +60,12 @@ namespace i2p |
|
|
|
isDaemon = i2p::util::config::GetArg("-daemon", 0); |
|
|
|
isDaemon = i2p::util::config::GetArg("-daemon", 0); |
|
|
|
isLogging = i2p::util::config::GetArg("-log", 1); |
|
|
|
isLogging = i2p::util::config::GetArg("-log", 1); |
|
|
|
|
|
|
|
|
|
|
|
//TODO: This is an ugly workaround. fix it.
|
|
|
|
int port = i2p::util::config::GetArg("-port", 0); |
|
|
|
//TODO: Autodetect public IP.
|
|
|
|
if (port) |
|
|
|
i2p::context.OverrideNTCPAddress(i2p::util::config::GetCharArg("-host", "127.0.0.1"), |
|
|
|
i2p::context.UpdatePort (port); |
|
|
|
i2p::util::config::GetArg("-port", 17007)); |
|
|
|
const char * host = i2p::util::config::GetCharArg("-host", ""); |
|
|
|
|
|
|
|
if (host && host[0]) |
|
|
|
|
|
|
|
i2p::context.UpdateAddress (host); |
|
|
|
|
|
|
|
|
|
|
|
if (i2p::util::config::GetArg("-unreachable", 0)) |
|
|
|
if (i2p::util::config::GetArg("-unreachable", 0)) |
|
|
|
i2p::context.SetUnreachable (); |
|
|
|
i2p::context.SetUnreachable (); |
|
|
|