Browse Source

[httpproxy] ordered jumps list

Signed-off-by: R4SAS <r4sas@i2pmail.org>
pull/1763/head
R4SAS 3 years ago
parent
commit
dfb171d32a
Signed by: r4sas
GPG Key ID: 66F6C87B98EBCFE2
  1. 12
      libi2pd_client/HTTPProxy.cpp

12
libi2pd_client/HTTPProxy.cpp

@ -32,7 +32,13 @@
namespace i2p { namespace i2p {
namespace proxy { namespace proxy {
std::map<std::string, std::string> jumpservices = { static const std::vector<std::string> jumporder = {
"reg.i2p",
"stats.i2p",
"identiguy.i2p",
};
static const std::map<std::string, std::string> jumpservices = {
{ "reg.i2p", "http://shx5vqsw7usdaunyzr2qmes2fq37oumybpudrd4jjj4e4vk4uusa.b32.i2p/jump/" }, { "reg.i2p", "http://shx5vqsw7usdaunyzr2qmes2fq37oumybpudrd4jjj4e4vk4uusa.b32.i2p/jump/" },
{ "identiguy.i2p", "http://3mzmrus2oron5fxptw7hw2puho3bnqmw2hqy7nw64dsrrjwdilva.b32.i2p/cgi-bin/query?hostname=" }, { "identiguy.i2p", "http://3mzmrus2oron5fxptw7hw2puho3bnqmw2hqy7nw64dsrrjwdilva.b32.i2p/cgi-bin/query?hostname=" },
{ "stats.i2p", "http://7tbay5p4kzeekxvyvbf6v7eauazemsnnl2aoyqhg5jzpr5eke7tq.b32.i2p/cgi-bin/jump.cgi?a=" }, { "stats.i2p", "http://7tbay5p4kzeekxvyvbf6v7eauazemsnnl2aoyqhg5jzpr5eke7tq.b32.i2p/cgi-bin/jump.cgi?a=" },
@ -174,8 +180,8 @@ namespace proxy {
<< "<p>" << tr("Remote host not found in router's addressbook") << "</p>\r\n" << "<p>" << tr("Remote host not found in router's addressbook") << "</p>\r\n"
<< "<p>" << tr("You may try to find this host on jump services below") << ":</p>\r\n" << "<p>" << tr("You may try to find this host on jump services below") << ":</p>\r\n"
<< "<ul>\r\n"; << "<ul>\r\n";
for (const auto& js : jumpservices) { for (const auto& jump : jumporder) {
ss << " <li><a href=\"" << js.second << host << "\">" << js.first << "</a></li>\r\n"; ss << " <li><a href=\"" << jumpservices[jump] << host << "\">" << jump << "</a></li>\r\n";
} }
ss << "</ul>\r\n"; ss << "</ul>\r\n";
std::string content = ss.str(); std::string content = ss.str();

Loading…
Cancel
Save