mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-08 22:13:48 +01:00
Patched RouterContext::CreateNewRouter to read from config if available.
As well as reading the version string from external file.
This commit is contained in:
parent
e7cf0b0f79
commit
68ade60004
2 changed files with 36 additions and 22 deletions
|
@ -4,6 +4,7 @@
|
||||||
#include "CryptoConst.h"
|
#include "CryptoConst.h"
|
||||||
#include "RouterContext.h"
|
#include "RouterContext.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
namespace i2p
|
namespace i2p
|
||||||
{
|
{
|
||||||
|
@ -31,12 +32,14 @@ namespace i2p
|
||||||
|
|
||||||
i2p::data::RouterInfo routerInfo;
|
i2p::data::RouterInfo routerInfo;
|
||||||
routerInfo.SetRouterIdentity (ident);
|
routerInfo.SetRouterIdentity (ident);
|
||||||
routerInfo.AddSSUAddress ("127.0.0.1", 17007, routerInfo.GetIdentHash ());
|
routerInfo.AddSSUAddress (i2p::util::config::GetCharArg("-host", "127.0.0.1"),
|
||||||
routerInfo.AddNTCPAddress ("127.0.0.1", 17007); // TODO:
|
i2p::util::config::GetArg("-port", 17007), routerInfo.GetIdentHash ());
|
||||||
|
routerInfo.AddNTCPAddress (i2p::util::config::GetCharArg("-host", "127.0.0.1"),
|
||||||
|
i2p::util::config::GetArg("-port", 17007));
|
||||||
routerInfo.SetProperty ("caps", "LR");
|
routerInfo.SetProperty ("caps", "LR");
|
||||||
routerInfo.SetProperty ("coreVersion", "0.9.11");
|
routerInfo.SetProperty ("coreVersion", I2P_VERSION);
|
||||||
routerInfo.SetProperty ("netId", "2");
|
routerInfo.SetProperty ("netId", "2");
|
||||||
routerInfo.SetProperty ("router.version", "0.9.11");
|
routerInfo.SetProperty ("router.version", I2P_VERSION);
|
||||||
routerInfo.SetProperty ("start_uptime", "90m");
|
routerInfo.SetProperty ("start_uptime", "90m");
|
||||||
routerInfo.CreateBuffer ();
|
routerInfo.CreateBuffer ();
|
||||||
|
|
||||||
|
|
11
version.h
Normal file
11
version.h
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
#ifndef _VERSION_H_
|
||||||
|
#define _VERSION_H_
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#define CODENAME "Purple"
|
||||||
|
|
||||||
|
#define I2P_VERSION "0.9.11"
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
Loading…
Add table
Reference in a new issue