[httpproxy] ordered jumps list

Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
R4SAS 2022-05-20 20:49:26 +03:00
parent 6b4ffcff5a
commit dfb171d32a
No known key found for this signature in database
GPG Key ID: 66F6C87B98EBCFE2

View File

@ -32,7 +32,13 @@
namespace i2p {
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/" },
{ "identiguy.i2p", "http://3mzmrus2oron5fxptw7hw2puho3bnqmw2hqy7nw64dsrrjwdilva.b32.i2p/cgi-bin/query?hostname=" },
{ "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("You may try to find this host on jump services below") << ":</p>\r\n"
<< "<ul>\r\n";
for (const auto& js : jumpservices) {
ss << " <li><a href=\"" << js.second << host << "\">" << js.first << "</a></li>\r\n";
for (const auto& jump : jumporder) {
ss << " <li><a href=\"" << jumpservices[jump] << host << "\">" << jump << "</a></li>\r\n";
}
ss << "</ul>\r\n";
std::string content = ss.str();