Compare commits
5 Commits
Author | SHA1 | Date |
---|---|---|
![]() |
a77455fb33 | |
![]() |
84c24abde8 | |
![]() |
d208af1557 | |
![]() |
163d572efc | |
![]() |
2b74129016 |
|
@ -10,7 +10,7 @@ endif()
|
|||
|
||||
function(add_html_content html_file const_name)
|
||||
file(READ "${html_file}" HTML_CONTENT)
|
||||
string(REPLACE "\n" " " HTML_CONTENT "${HTML_CONTENT}")
|
||||
# string(REPLACE "\n" " " HTML_CONTENT "${HTML_CONTENT}")
|
||||
string(REGEX REPLACE " + " " " HTML_CONTENT "${HTML_CONTENT}")
|
||||
string(REGEX REPLACE "^ +| +$" "" HTML_CONTENT "${HTML_CONTENT}")
|
||||
|
||||
|
|
|
@ -115,15 +115,14 @@
|
|||
<p><a href="/" style="text-decoration: none; color: #007bff; margin-bottom: 20px;">{{go_back}}</a></p>
|
||||
</center>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<div>
|
||||
<a href="{{url}}&lang=en">English</a> | <a href="{{url}}&lang=ru">Русский</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="http://git.community.i2p/acetone/i2pdtunnelwizard" target="_blank" style="text-decoration: none">i2pd tunnel wizard</a> v{{version}} <br>
|
||||
acetone, 2025 (no copyright)
|
||||
</div>
|
||||
<a href="http://git.community.i2p/acetone/i2pdtunnelwizard" target="_blank" style="text-decoration: none">i2pd tunnel wizard</a> v{{version}} <br>
|
||||
acetone, 2025 (no copyright)
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
|
|
|
@ -66,7 +66,8 @@
|
|||
<a href="/" title="{{to_start_title}}" style="text-decoration: none"><h1><span style="color: purple">i2pd</span> <span style="color: black">tunnel wizard</span></h1></a>
|
||||
<p style="text-align: center">{{tagline}}</p>
|
||||
|
||||
<div class="code-block">{{payload}}</div>
|
||||
<div class="code-block">{{payload}}
|
||||
</div>
|
||||
|
||||
<center>
|
||||
<a href="/" class="button">{{to_start}}</a>
|
||||
|
@ -78,10 +79,8 @@
|
|||
<div>
|
||||
<a href="{{url}}&lang=en">English</a> | <a href="{{url}}&lang=ru">Русский</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="http://git.community.i2p/acetone/i2pdtunnelwizard" target="_blank" style="text-decoration: none">i2pd tunnel wizard</a> v{{version}} <br>
|
||||
acetone, 2025 (no copyright)
|
||||
</div>
|
||||
<a href="http://git.community.i2p/acetone/i2pdtunnelwizard" target="_blank" style="text-decoration: none">i2pd tunnel wizard</a> v{{version}} <br>
|
||||
acetone, 2025 (no copyright)
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
|
|
|
@ -73,10 +73,8 @@
|
|||
<div>
|
||||
<a href="{{url}}&lang=en">English</a> | <a href="{{url}}&lang=ru">Русский</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="http://git.community.i2p/acetone/i2pdtunnelwizard" target="_blank" style="text-decoration: none">i2pd tunnel wizard</a> v{{version}} <br>
|
||||
acetone, 2025 (no copyright)
|
||||
</div>
|
||||
<a href="http://git.community.i2p/acetone/i2pdtunnelwizard" target="_blank" style="text-decoration: none">i2pd tunnel wizard</a> v{{version}} <br>
|
||||
acetone, 2025 (no copyright)
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
|
|
|
@ -83,10 +83,8 @@
|
|||
<div>
|
||||
<a href="{{url}}&lang=en">English</a> | <a href="{{url}}&lang=ru">Русский</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="http://git.community.i2p/acetone/i2pdtunnelwizard" target="_blank" style="text-decoration: none">i2pd tunnel wizard</a> v{{version}} <br>
|
||||
acetone, 2025 (no copyright)
|
||||
</div>
|
||||
<a href="http://git.community.i2p/acetone/i2pdtunnelwizard" target="_blank" style="text-decoration: none">i2pd tunnel wizard</a> v{{version}} <br>
|
||||
acetone, 2025 (no copyright)
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
|
|
|
@ -85,15 +85,14 @@
|
|||
<div class="note">
|
||||
{{about}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<div>
|
||||
<a href="/?lang=en">English</a> | <a href="/?lang=ru">Русский</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="http://git.community.i2p/acetone/i2pdtunnelwizard" target="_blank" style="text-decoration: none">i2pd tunnel wizard</a> v{{version}} <br>
|
||||
acetone, 2025 (no copyright)
|
||||
</div>
|
||||
<a href="http://git.community.i2p/acetone/i2pdtunnelwizard" target="_blank" style="text-decoration: none">i2pd tunnel wizard</a> v{{version}} <br>
|
||||
acetone, 2025 (no copyright)
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
|
|
19
notepad.cpp
19
notepad.cpp
|
@ -250,6 +250,21 @@ const char8_t *Notepad::ConfigComment::serverBlindedWithDhPrivateKey(Lang lang)
|
|||
}
|
||||
}
|
||||
|
||||
const char8_t *Notepad::ConfigComment::serverBlindedWithPassword(Lang lang)
|
||||
{
|
||||
switch (lang)
|
||||
{
|
||||
case Lang::ru: {
|
||||
static const char8_t* ru {u8"# Пароль для "};
|
||||
return ru;
|
||||
}
|
||||
default: {
|
||||
static const char8_t* en {u8"# A password for "};
|
||||
return en;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const char8_t *Notepad::ConfigComment::inbound(Lang lang)
|
||||
{
|
||||
switch (lang)
|
||||
|
@ -1179,7 +1194,7 @@ const char8_t *Notepad::WebUi::mainLength(Lang lang)
|
|||
return ru;
|
||||
}
|
||||
default: {
|
||||
static const char8_t* en {u8"Thread length (number of transit nodes)"};
|
||||
static const char8_t* en {u8"Tunnel length (number of transit nodes)"};
|
||||
return en;
|
||||
}
|
||||
}
|
||||
|
@ -1433,7 +1448,7 @@ const std::u8string Notepad::WebUi::b33AboutServer(Lang lang, TunnelType type)
|
|||
case Lang::ru: {
|
||||
static const char8_t* ru0 {u8"I2P имеет несколько вариантов обеспечения дополнительной защиты от случайных посетителей для вашего сервиса типа \""};
|
||||
static const char8_t* ru1 {u8"\". При использовании зашифрованного лизсета вы получаете защиту от нежелательных запросов на уровне сети (у несанкционированного пользователя "
|
||||
"не будет возможности установить контакт роутером сервера)."};
|
||||
"не будет возможности установить контакт с роутером сервера)."};
|
||||
str = ru0;
|
||||
str += tunnelType(lang, type);
|
||||
str += ru1;
|
||||
|
|
|
@ -33,6 +33,7 @@ public:
|
|||
static const char8_t* serverBlindedWithPsk(Lang lang);
|
||||
static const char8_t* serverBlindedWithDh(Lang lang);
|
||||
static const char8_t* serverBlindedWithDhPrivateKey(Lang lang);
|
||||
static const char8_t* serverBlindedWithPassword(Lang lang);
|
||||
static const char8_t* inbound(Lang lang);
|
||||
static const char8_t* outbound(Lang lang);
|
||||
static const char8_t* length(Lang lang);
|
||||
|
|
|
@ -314,8 +314,12 @@ std::u8string TunnelConstructor::generate() const
|
|||
// yes. this is C++ casting hell :)
|
||||
// i2cp.leaseSetClient.psk.NUMBER = userNUMBER:b64_password
|
||||
const auto password = RandomStringGenerator::getU8string(32);
|
||||
const std::u8string passwordu8 { reinterpret_cast<const char8_t*>( cppcodec_samty::base64_i2p::encode( reinterpret_cast<const char*>(password.c_str()), password.size() ).c_str() ) };
|
||||
config += Notepad::ConfigComment::serverBlindedWithPassword(lang_);
|
||||
config += u8"user" + std::u8string(reinterpret_cast<const char8_t*>(std::to_string(i).c_str())) + u8": ";
|
||||
config += passwordu8 + u8"\n";
|
||||
config += u8"i2cp.leaseSetClient.psk." + std::u8string(reinterpret_cast<const char8_t*>(std::to_string(i).c_str())) + u8" = user" + std::u8string(reinterpret_cast<const char8_t*>(std::to_string(i).c_str())) + u8":";
|
||||
config += std::u8string(reinterpret_cast<const char8_t*>( cppcodec_samty::base64_i2p::encode( reinterpret_cast<const char*>(password.c_str()), password.size() ).c_str() ));
|
||||
config += passwordu8;
|
||||
config += u8"\n";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue