mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
Fix values
This commit is contained in:
parent
d930947853
commit
4032a611bf
9 changed files with 22 additions and 23 deletions
|
@ -82,7 +82,7 @@ namespace config {
|
|||
httpserver.add_options()
|
||||
("http.enabled", value<bool>()->default_value(true), "Enable or disable webconsole")
|
||||
("http.address", value<std::string>()->default_value("127.0.0.1"), "Webconsole listen address")
|
||||
("http.port", value<uint16_t>()->default_value(7070), "Webconsole listen port")
|
||||
("http.port", value<uint16_t>()->default_value(5050), "Webconsole listen port")
|
||||
("http.auth", value<bool>()->default_value(false), "Enable Basic HTTP auth for webconsole")
|
||||
("http.user", value<std::string>()->default_value("dotnet"), "Username for basic auth")
|
||||
("http.pass", value<std::string>()->default_value(""), "Password for basic auth (default: random, see logs)")
|
||||
|
@ -95,7 +95,7 @@ namespace config {
|
|||
httpproxy.add_options()
|
||||
("httpproxy.enabled", value<bool>()->default_value(true), "Enable or disable HTTP Proxy")
|
||||
("httpproxy.address", value<std::string>()->default_value("127.0.0.1"), "HTTP Proxy listen address")
|
||||
("httpproxy.port", value<uint16_t>()->default_value(4444), "HTTP Proxy listen port")
|
||||
("httpproxy.port", value<uint16_t>()->default_value(5555), "HTTP Proxy listen port")
|
||||
("httpproxy.keys", value<std::string>()->default_value(""), "File to persist HTTP Proxy keys")
|
||||
("httpproxy.signaturetype", value<dotnet::data::SigningKeyType>()->default_value(dotnet::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519), "Signature type for new keys. 7 (EdDSA) by default")
|
||||
("httpproxy.inbound.length", value<std::string>()->default_value("3"), "HTTP proxy inbound tunnel length")
|
||||
|
@ -112,7 +112,7 @@ namespace config {
|
|||
socksproxy.add_options()
|
||||
("socksproxy.enabled", value<bool>()->default_value(true), "Enable or disable SOCKS Proxy")
|
||||
("socksproxy.address", value<std::string>()->default_value("127.0.0.1"), "SOCKS Proxy listen address")
|
||||
("socksproxy.port", value<uint16_t>()->default_value(4447), "SOCKS Proxy listen port")
|
||||
("socksproxy.port", value<uint16_t>()->default_value(5055), "SOCKS Proxy listen port")
|
||||
("socksproxy.keys", value<std::string>()->default_value(""), "File to persist SOCKS Proxy keys")
|
||||
("socksproxy.signaturetype", value<dotnet::data::SigningKeyType>()->default_value(dotnet::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519), "Signature type for new keys. 7 (EdDSA) by default")
|
||||
("socksproxy.inbound.length", value<std::string>()->default_value("3"), "SOCKS proxy inbound tunnel length")
|
||||
|
@ -123,35 +123,35 @@ namespace config {
|
|||
("socksproxy.latency.max", value<std::string>()->default_value("0"), "SOCKS proxy max latency for tunnels")
|
||||
("socksproxy.outproxy.enabled", value<bool>()->default_value(false), "Enable or disable SOCKS outproxy")
|
||||
("socksproxy.outproxy", value<std::string>()->default_value("127.0.0.1"), "Upstream outproxy address for SOCKS Proxy")
|
||||
("socksproxy.outproxyport", value<uint16_t>()->default_value(9050), "Upstream outproxy port for SOCKS Proxy")
|
||||
("socksproxy.outproxyport", value<uint16_t>()->default_value(5505), "Upstream outproxy port for SOCKS Proxy")
|
||||
;
|
||||
|
||||
options_description sam("SAM bridge options");
|
||||
sam.add_options()
|
||||
("sam.enabled", value<bool>()->default_value(true), "Enable or disable SAM Application bridge")
|
||||
("sam.address", value<std::string>()->default_value("127.0.0.1"), "SAM listen address")
|
||||
("sam.port", value<uint16_t>()->default_value(7656), "SAM listen port")
|
||||
("sam.port", value<uint16_t>()->default_value(50000), "SAM listen port")
|
||||
;
|
||||
|
||||
options_description bob("BOB options");
|
||||
bob.add_options()
|
||||
("bob.enabled", value<bool>()->default_value(false), "Enable or disable BOB command channel")
|
||||
("bob.address", value<std::string>()->default_value("127.0.0.1"), "BOB listen address")
|
||||
("bob.port", value<uint16_t>()->default_value(2827), "BOB listen port")
|
||||
("bob.port", value<uint16_t>()->default_value(50505), "BOB listen port")
|
||||
;
|
||||
|
||||
options_description dncp("DNCP options");
|
||||
dncp.add_options()
|
||||
("dncp.enabled", value<bool>()->default_value(false), "Enable or disable DNCP")
|
||||
("dncp.address", value<std::string>()->default_value("127.0.0.1"), "DNCP listen address")
|
||||
("dncp.port", value<uint16_t>()->default_value(7654), "DNCP listen port")
|
||||
("dncp.port", value<uint16_t>()->default_value(50555), "DNCP listen port")
|
||||
;
|
||||
|
||||
options_description dotnetcontrol("DotNetControl options");
|
||||
dotnetcontrol.add_options()
|
||||
("dotnetcontrol.enabled", value<bool>()->default_value(false), "Enable or disable DOTNET Control Protocol")
|
||||
("dotnetcontrol.address", value<std::string>()->default_value("127.0.0.1"), "DOTNETCP listen address")
|
||||
("dotnetcontrol.port", value<uint16_t>()->default_value(7650), "DOTNETCP listen port")
|
||||
("dotnetcontrol.port", value<uint16_t>()->default_value(55505), "DOTNETCP listen port")
|
||||
("dotnetcontrol.password", value<std::string>()->default_value("dotnet"), "DOTNETCP access password")
|
||||
("dotnetcontrol.cert", value<std::string>()->default_value("dotnetcontrol.crt.pem"), "DOTNETCP connection certificate")
|
||||
("dotnetcontrol.key", value<std::string>()->default_value("dotnetcontrol.key.pem"), "DOTNETCP connection certificate key")
|
||||
|
@ -195,7 +195,7 @@ namespace config {
|
|||
options_description addressbook("AddressBook options");
|
||||
addressbook.add_options()
|
||||
("addressbook.defaulturl", value<std::string>()->default_value(
|
||||
"http://joajgazyztfssty4w2on5oaqksz6tqoxbduy553y34mf4byv6gpq.b32.dotnet/export/alive-hosts.txt"
|
||||
"http://f26brxp77ydqc7cnjctnj75ktcgjhh3tqqvrgf4a6l25aqk3vp3a.dot.net/export/alive-hosts.txt"
|
||||
), "AddressBook subscription URL for initial setup")
|
||||
("addressbook.subscriptions", value<std::string>()->default_value(""), "AddressBook subscriptions URLs, separated by comma");
|
||||
|
||||
|
@ -211,7 +211,7 @@ namespace config {
|
|||
websocket.add_options()
|
||||
("websockets.enabled", value<bool>()->default_value(false), "Enable websocket server")
|
||||
("websockets.address", value<std::string>()->default_value("127.0.0.1"), "Address to bind websocket server on")
|
||||
("websockets.port", value<uint16_t>()->default_value(7666), "Port to bind websocket server on")
|
||||
("websockets.port", value<uint16_t>()->default_value(55555), "Port to bind websocket server on")
|
||||
;
|
||||
|
||||
options_description exploratory("Exploratory Options");
|
||||
|
|
|
@ -1102,7 +1102,7 @@ namespace client
|
|||
return;
|
||||
}
|
||||
|
||||
LogPrint (eLogInfo, "Destination: Creating new temporary keys of type for address ", ident, ".b32.dotnet");
|
||||
LogPrint (eLogInfo, "Destination: Creating new temporary keys of type for address ", ident, ".dot.net");
|
||||
memset (m_EncryptionPrivateKey, 0, 256);
|
||||
memset (m_EncryptionPublicKey, 0, 256);
|
||||
dotnet::data::PrivateKeys::GenerateCryptoKeyPair (GetIdentity ()->GetCryptoKeyType (), m_EncryptionPrivateKey, m_EncryptionPublicKey);
|
||||
|
|
|
@ -134,7 +134,7 @@ namespace data
|
|||
public:
|
||||
|
||||
BlindedPublicKey (std::shared_ptr<const IdentityEx> identity, SigningKeyType blindedKeyType = dotnet::data::SIGNING_KEY_TYPE_REDDSA_SHA512_ED25519);
|
||||
BlindedPublicKey (const std::string& b33); // from b33 without .b32.dotnet
|
||||
BlindedPublicKey (const std::string& b33); // from b33 without .dot.net
|
||||
std::string ToB33 () const;
|
||||
|
||||
const uint8_t * GetPublicKey () const { return m_PublicKey.data (); };
|
||||
|
|
|
@ -318,7 +318,7 @@ namespace client
|
|||
|
||||
std::shared_ptr<const Address> AddressBook::GetAddress (const std::string& address)
|
||||
{
|
||||
auto pos = address.find(".b32.dotnet");
|
||||
auto pos = address.find(".dot.net");
|
||||
if (pos != std::string::npos)
|
||||
return std::make_shared<const Address>(address.substr (0, pos));
|
||||
else
|
||||
|
@ -332,7 +332,7 @@ namespace client
|
|||
return addr;
|
||||
}
|
||||
}
|
||||
// if not .b32 we assume full base64 address
|
||||
// if not .dot.net we assume full base64 address
|
||||
dotnet::data::IdentityEx dest;
|
||||
if (!dest.FromBase64 (address))
|
||||
return nullptr;
|
||||
|
@ -349,7 +349,7 @@ namespace client
|
|||
|
||||
void AddressBook::InsertAddress (const std::string& address, const std::string& jump)
|
||||
{
|
||||
auto pos = jump.find(".b32.dotnet");
|
||||
auto pos = jump.find(".dot.net");
|
||||
if (pos != std::string::npos)
|
||||
{
|
||||
m_Addresses[address] = std::make_shared<Address>(jump.substr (0, pos));
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace client
|
|||
bool IsIdentHash () const { return addressType == eAddressIndentHash; };
|
||||
};
|
||||
|
||||
inline std::string GetB32Address(const dotnet::data::IdentHash& ident) { return ident.ToBase32().append(".b32.dotnet"); }
|
||||
inline std::string GetB32Address(const dotnet::data::IdentHash& ident) { return ident.ToBase32().append(".dot.net"); }
|
||||
|
||||
class AddressBookStorage // interface for storage
|
||||
{
|
||||
|
@ -83,7 +83,7 @@ namespace client
|
|||
|
||||
bool LoadHostsFromStream (std::istream& f, bool is_update);
|
||||
void DownloadComplete (bool success, const dotnet::data::IdentHash& subscription, const std::string& etag, const std::string& lastModified);
|
||||
//This method returns the ".b32.dotnet" address
|
||||
//This method returns the ".dot.net" address
|
||||
std::string ToAddress(const dotnet::data::IdentHash& ident) { return GetB32Address(ident); }
|
||||
std::string ToAddress(std::shared_ptr<const dotnet::data::IdentityEx> ident) { return ToAddress(ident->GetIdentHash ()); }
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace client
|
|||
// for HTTP tunnels
|
||||
const char X_DOTNET_DEST_HASH[] = "X-DOTNET-DestHash"; // hash in base64
|
||||
const char X_DOTNET_DEST_B64[] = "X-DOTNET-DestB64"; // full address in base64
|
||||
const char X_DOTNET_DEST_B32[] = "X-DOTNET-DestB32"; // .b32.dotnet address
|
||||
const char X_DOTNET_DEST_B32[] = "X-DOTNET-DestB32"; // .dot.net address
|
||||
|
||||
class DotNetTunnelConnection: public DotNetServiceHandler, public std::enable_shared_from_this<DotNetTunnelConnection>
|
||||
{
|
||||
|
|
|
@ -23,13 +23,12 @@
|
|||
namespace dotnet {
|
||||
namespace proxy {
|
||||
std::map<std::string, std::string> jumpservices = {
|
||||
{ "inr.dotnet", "http://joajgazyztfssty4w2on5oaqksz6tqoxbduy553y34mf4byv6gpq.b32.dotnet/search/?q=" },
|
||||
{ "stats.dotnet", "http://7tbay5p4kzeekxvyvbf6v7eauazemsnnl2aoyqhg5jzpr5eke7tq.b32.dotnet/cgi-bin/jump.cgi?a=" },
|
||||
{ "dot.net", "http://f26brxp77ydqc7cnjctnj75ktcgjhh3tqqvrgf4a6l25aqk3vp3a.dot.net/search/?q=" },
|
||||
};
|
||||
|
||||
static const char *pageHead =
|
||||
"<head>\r\n"
|
||||
" <title>DOTNET HTTP proxy</title>\r\n"
|
||||
" <title>.NET HTTP proxy</title>\r\n"
|
||||
" <style type=\"text/css\">\r\n"
|
||||
" body { font: 100%/1.5em sans-serif; margin: 0; padding: 1.5em; background: #FAFAFA; color: #103456; }\r\n"
|
||||
" .header { font-size: 2.5em; text-align: center; margin: 1.5em 0; color: #894C84; }\r\n"
|
||||
|
|
|
@ -209,7 +209,7 @@ namespace client
|
|||
{
|
||||
std::stringstream ss;
|
||||
ss << from.GetIdentHash().ToBase32();
|
||||
ss << ".b32.dotnet:";
|
||||
ss << ".dot.net:";
|
||||
ss << std::to_string(fromPort);
|
||||
ss << "\n";
|
||||
ss.write((char *)buf, len);
|
||||
|
|
|
@ -152,7 +152,7 @@ public:
|
|||
bool isUniqueLocal = section.second.get(DOTNET_SERVER_TUNNEL_ENABLE_UNIQUE_LOCAL, true);
|
||||
# * inport -- optional, dotnet service port, if unset - the same as 'port'
|
||||
# * accesslist -- comma-separated list of dotnet addresses, allowed to connect
|
||||
# every address is b32 without '.b32.dotnet' part
|
||||
# every address is b32 without '.dot.net' part
|
||||
[somelabel]
|
||||
type = server
|
||||
host = 127.0.0.1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue