mirror of https://github.com/oxen-io/lokinet
fix up pyllarp parts
* expose paths config in pyllarp * fix up pyllarp unit tests
This commit is contained in:
parent
0fa91381ba
commit
ed97d29c97
|
@ -25,6 +25,7 @@ namespace llarp
|
|||
.def_readwrite("lokid", &Config::lokid)
|
||||
.def_readwrite("bootstrap", &Config::bootstrap)
|
||||
.def_readwrite("logging", &Config::logging)
|
||||
.def_readwrite("paths", &Config::paths)
|
||||
.def("Load", &Config::Load);
|
||||
|
||||
py::class_<RouterConfig>(mod, "RouterConfig")
|
||||
|
@ -47,6 +48,10 @@ namespace llarp
|
|||
.def_readwrite("numNetThreads", &RouterConfig::m_numNetThreads)
|
||||
.def_readwrite("JobQueueSize", &RouterConfig::m_JobQueueSize);
|
||||
|
||||
py::class_<PeerSelectionConfig>(mod, "PeerSelectionConfig")
|
||||
.def(py::init<>())
|
||||
.def_readwrite("netmask", &PeerSelectionConfig::m_UniqueHopsNetmaskSize);
|
||||
|
||||
py::class_<NetworkConfig>(mod, "NetworkConfig")
|
||||
.def(py::init<>())
|
||||
.def_readwrite("enableProfiling", &NetworkConfig::m_enableProfiling)
|
||||
|
|
|
@ -68,8 +68,8 @@ class RouterHive(object):
|
|||
config.network.enableProfiling = False
|
||||
config.network.endpointType = 'null'
|
||||
|
||||
config.links.addInboundLink("lo", AF_INET, port);
|
||||
config.links.setOutboundLink("lo", AF_INET, port + 10000);
|
||||
config.links.addInboundLink("lo", AF_INET, port)
|
||||
config.links.setOutboundLink("lo", AF_INET, 0)
|
||||
|
||||
# config.dns.options = {"local-dns": ("127.3.2.1:%d" % port)}
|
||||
if index == 0:
|
||||
|
@ -90,9 +90,9 @@ class RouterHive(object):
|
|||
config = pyllarp.Config(dirname)
|
||||
config.Load(None, False);
|
||||
|
||||
port = index + 50000
|
||||
tunname = "lokihive%d" % index
|
||||
|
||||
config.paths.netmask = 0
|
||||
config.router.dataDir = dirname
|
||||
config.router.netid = self.netid
|
||||
config.router.blockBogons = False
|
||||
|
@ -100,7 +100,7 @@ class RouterHive(object):
|
|||
config.network.enableProfiling = False
|
||||
config.network.endpointType = 'null'
|
||||
|
||||
config.links.setOutboundLink("lo", AF_INET, port + 10000);
|
||||
config.links.setOutboundLink("lo", AF_INET, 0);
|
||||
|
||||
# config.dns.options = {"local-dns": ("127.3.2.1:%d" % port)}
|
||||
|
||||
|
|
Loading…
Reference in New Issue