mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
override SSU port if specified
This commit is contained in:
parent
888a19fdba
commit
c8cdeead44
3 changed files with 20 additions and 15 deletions
10
Daemon.cpp
10
Daemon.cpp
|
@ -60,10 +60,12 @@ namespace i2p
|
|||
isDaemon = i2p::util::config::GetArg("-daemon", 0);
|
||||
isLogging = i2p::util::config::GetArg("-log", 1);
|
||||
|
||||
//TODO: This is an ugly workaround. fix it.
|
||||
//TODO: Autodetect public IP.
|
||||
i2p::context.OverrideNTCPAddress(i2p::util::config::GetCharArg("-host", "127.0.0.1"),
|
||||
i2p::util::config::GetArg("-port", 17007));
|
||||
int port = i2p::util::config::GetArg("-port", 0);
|
||||
if (port)
|
||||
i2p::context.UpdatePort (port);
|
||||
const char * host = i2p::util::config::GetCharArg("-host", "");
|
||||
if (host && host[0])
|
||||
i2p::context.UpdateAddress (host);
|
||||
|
||||
if (i2p::util::config::GetArg("-unreachable", 0))
|
||||
i2p::context.SetUnreachable ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue