Browse Source

Status: Proxy

pull/1640/head
orignal 4 years ago
parent
commit
f38920c338
  1. 2
      daemon/HTTPServer.cpp
  2. 3
      libi2pd/RouterContext.h
  3. 1
      libi2pd/Transports.cpp

2
daemon/HTTPServer.cpp

@ -252,6 +252,8 @@ namespace http {
case eRouterStatusOK: s << "OK"; break; case eRouterStatusOK: s << "OK"; break;
case eRouterStatusTesting: s << "Testing"; break; case eRouterStatusTesting: s << "Testing"; break;
case eRouterStatusFirewalled: s << "Firewalled"; break; case eRouterStatusFirewalled: s << "Firewalled"; break;
case eRouterStatusUnknown: s << "Unknown"; break;
case eRouterStatusProxy: s << "Proxy"; break;
case eRouterStatusError: case eRouterStatusError:
{ {
s << "Error"; s << "Error";

3
libi2pd/RouterContext.h

@ -37,7 +37,8 @@ namespace garlic
eRouterStatusTesting = 1, eRouterStatusTesting = 1,
eRouterStatusFirewalled = 2, eRouterStatusFirewalled = 2,
eRouterStatusError = 3, eRouterStatusError = 3,
eRouterStatusUnknown = 4 eRouterStatusUnknown = 4,
eRouterStatusProxy = 5
}; };
enum RouterError enum RouterError

1
libi2pd/Transports.cpp

@ -189,6 +189,7 @@ namespace transport
proxytype = NTCP2Server::eHTTPProxy; proxytype = NTCP2Server::eHTTPProxy;
m_NTCP2Server->UseProxy(proxytype, proxyurl.host, proxyurl.port); m_NTCP2Server->UseProxy(proxytype, proxyurl.host, proxyurl.port);
i2p::context.SetStatus (eRouterStatusProxy);
} }
else else
LogPrint(eLogError, "Transports: unsupported NTCP2 proxy URL ", ntcp2proxy); LogPrint(eLogError, "Transports: unsupported NTCP2 proxy URL ", ntcp2proxy);

Loading…
Cancel
Save