MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / HTTPProxyInfoHandler

Method HTTPProxyInfoHandler

daemon/I2PControlHandlers.cpp:380–395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

378 }
379
380 void I2PControlHandlers::HTTPProxyInfoHandler (std::ostringstream& results)
381 {
382 boost::property_tree::ptree pt;
383
384 auto httpProxy = i2p::client::context.GetHttpProxy ();
385 if (httpProxy)
386 {
387 auto& ident = httpProxy->GetLocalDestination ()->GetIdentHash();
388 pt.put("enabled", true);
389 pt.put("address", i2p::client::context.GetAddressBook ().ToAddress(ident));
390 }
391 else
392 pt.put("enabled", false);
393
394 InsertParam (results, "HTTPProxy", pt);
395 }
396
397 void I2PControlHandlers::SOCKSInfoHandler (std::ostringstream& results)
398 {

Callers

nothing calls this directly

Calls 3

GetHttpProxyMethod · 0.80
ToAddressMethod · 0.80
GetLocalDestinationMethod · 0.45

Tested by

no test coverage detected