This commit is contained in:
Михаил Подивилов 2019-05-11 22:26:56 +03:00
parent 895416fc1f
commit f5ec966db3
3 changed files with 12 additions and 12 deletions

View file

@ -51,18 +51,18 @@ namespace http {
const char *cssStyles = const char *cssStyles =
"<style>\r\n" "<style>\r\n"
" body { font: 100%/1.5em sans-serif; margin: 0; padding: 1.5em; background: #FAFAFA; color: #103456; }\r\n" " body { font: 100%/1.5em sans-serif; margin: 0; padding: 1.5em; background: #fff; color: #000; }\r\n"
" a, .slide label { text-decoration: none; color: #894C84; }\r\n" " a, .slide label { text-decoration: none; color: #000; }\r\n"
" a:hover, .slide label:hover { color: #FAFAFA; background: #894C84; }\r\n" " a:hover, .slide label:hover { color: #fff; background: #000; }\r\n"
" .header { font-size: 2.5em; text-align: center; margin: 1.5em 0; color: #894C84; }\r\n" " .header { font-size: 2.5em; text-align: center; margin: 1.5em 0; color: #000; }\r\n"
" .wrapper { margin: 0 auto; padding: 1em; max-width: 60em; }\r\n" " .wrapper { margin: 0 auto; padding: 1em; max-width: 60em; }\r\n"
" .left { float: left; position: absolute; }\r\n" " .left { float: left; position: absolute; }\r\n"
" .right { float: left; font-size: 1em; margin-left: 13em; max-width: 46em; overflow: auto; }\r\n" " .right { float: left; font-size: 1em; margin-left: 13em; max-width: 46em; overflow: auto; }\r\n"
" .tunnel.established { color: #56B734; }\r\n" " .tunnel.established { color: #56b734; }\r\n"
" .tunnel.expiring { color: #D3AE3F; }\r\n" " .tunnel.expiring { color: #d3ae3f; }\r\n"
" .tunnel.failed { color: #D33F3F; }\r\n" " .tunnel.failed { color: #d33f3f; }\r\n"
" .tunnel.building { color: #434343; }\r\n" " .tunnel.building { color: #434343; }\r\n"
" caption { font-size: 1.5em; text-align: center; color: #894C84; }\r\n" " caption { font-size: 1.5em; text-align: center; color: #000; }\r\n"
" table { width: 100%; border-collapse: collapse; text-align: center; }\r\n" " table { width: 100%; border-collapse: collapse; text-align: center; }\r\n"
" .slide p, .slide [type='checkbox']{ display:none; }\r\n" " .slide p, .slide [type='checkbox']{ display:none; }\r\n"
" .slide [type='checkbox']:checked ~ p { display:block; margin-top: 0; padding: 0; }\r\n" " .slide [type='checkbox']:checked ~ p { display:block; margin-top: 0; padding: 0; }\r\n"

View file

@ -187,7 +187,7 @@ namespace config {
("reseed.zipfile", value<std::string>()->default_value(""), "Path to local .zip file to reseed from") ("reseed.zipfile", value<std::string>()->default_value(""), "Path to local .zip file to reseed from")
("reseed.proxy", value<std::string>()->default_value(""), "url for reseed proxy, supports http/socks") ("reseed.proxy", value<std::string>()->default_value(""), "url for reseed proxy, supports http/socks")
("reseed.urls", value<std::string>()->default_value( ("reseed.urls", value<std::string>()->default_value(
"https://reseed.podivilov.ru/,", "https://reseed.podivilov.ru/,"
"https://reseed.podivilov.com/" "https://reseed.podivilov.com/"
), "Reseed URLs, separated by comma") ), "Reseed URLs, separated by comma")
; ;

View file

@ -187,7 +187,7 @@ namespace proxy {
bool HTTPReqHandler::ExtractAddressHelper(dotnet::http::URL & url, std::string & b64, bool & confirm) bool HTTPReqHandler::ExtractAddressHelper(dotnet::http::URL & url, std::string & b64, bool & confirm)
{ {
confirm = false; confirm = false;
const char *param = "dotnetaddresshelper="; const char *param = "addresshelper=";
std::size_t pos = url.query.find(param); std::size_t pos = url.query.find(param);
std::size_t len = std::strlen(param); std::size_t len = std::strlen(param);
std::map<std::string, std::string> params; std::map<std::string, std::string> params;
@ -198,7 +198,7 @@ namespace proxy {
if (!url.parse_query(params)) if (!url.parse_query(params))
return false; return false;
std::string value = params["dotnetaddresshelper"]; std::string value = params["addresshelper"];
len += value.length(); len += value.length();
b64 = dotnet::http::UrlDecode(value); b64 = dotnet::http::UrlDecode(value);
// if we need update exists, request formed with update param // if we need update exists, request formed with update param
@ -276,7 +276,7 @@ namespace proxy {
{ {
std::stringstream ss; std::stringstream ss;
ss << "Host " << m_RequestURL.host << " <font color=red>already in router's addressbook</font>. " ss << "Host " << m_RequestURL.host << " <font color=red>already in router's addressbook</font>. "
<< "Click <a href=\"" << m_RequestURL.query << "?dotnetaddresshelper=" << jump << "&update=true\">here</a> to update record."; << "Click <a href=\"" << m_RequestURL.query << "?addresshelper=" << jump << "&update=true\">here</a> to update record.";
GenericProxyInfo("Addresshelper found", ss.str().c_str()); GenericProxyInfo("Addresshelper found", ss.str().c_str());
return true; /* request processed */ return true; /* request processed */
} }