diff --git a/modules/ripple_core/functional/ripple_Config.cpp b/modules/ripple_core/functional/ripple_Config.cpp index 33db2fbd0..b4d8ff27b 100644 --- a/modules/ripple_core/functional/ripple_Config.cpp +++ b/modules/ripple_core/functional/ripple_Config.cpp @@ -83,6 +83,19 @@ Config::Config () ELB_SUPPORT = false; RUN_STANDALONE = false; START_UP = NORMAL; + + + //-------------------------------------------------------------------------- + // + // VFALCO NOTE Clean area + // + + proxyListeningPort = 0; + + // + // + // + //-------------------------------------------------------------------------- } void Config::setup (const std::string& strConf, bool bTestNet, bool bQuiet) @@ -319,14 +332,20 @@ void Config::load () // // VFALCO BEGIN CLEAN // - getConfig ().nodeDatabase = parseKeyValueSection ( + nodeDatabase = parseKeyValueSection ( secConfig, ConfigSection::nodeDatabase ()); - getConfig ().ephemeralNodeDatabase = parseKeyValueSection ( + ephemeralNodeDatabase = parseKeyValueSection ( secConfig, ConfigSection::tempNodeDatabase ()); - getConfig ().importNodeDatabase = parseKeyValueSection ( + importNodeDatabase = parseKeyValueSection ( secConfig, ConfigSection::importNodeDatabase ()); + + if (SectionSingleB (secConfig, SECTION_PEER_PROXY_PORT, strTemp) + proxyListeningPort = lexicalCastThrow (strTemp); + else + proxyListeningPort = 0; + // // VFALCO END CLEAN // diff --git a/modules/ripple_core/functional/ripple_Config.h b/modules/ripple_core/functional/ripple_Config.h index 839fa1456..42d880c6b 100644 --- a/modules/ripple_core/functional/ripple_Config.h +++ b/modules/ripple_core/functional/ripple_Config.h @@ -119,6 +119,16 @@ public: */ StringPairArray importNodeDatabase; + /** PROXY listening port number + If this is not zero, it indicates an additional port number on + which we should accept incoming Peer connections that will also + require a PROXY handshake. + + The PROXY Protocol: + http://haproxy.1wt.eu/download/1.5/doc/proxy-protocol.txt + */ + int proxyListeningPort; + bool ELB_SUPPORT; // Support Amazon ELB std::string VALIDATORS_SITE; // Where to find validators.txt on the Internet. diff --git a/modules/ripple_core/functional/ripple_ConfigSections.h b/modules/ripple_core/functional/ripple_ConfigSections.h index 445137ae4..174360404 100644 --- a/modules/ripple_core/functional/ripple_ConfigSections.h +++ b/modules/ripple_core/functional/ripple_ConfigSections.h @@ -41,6 +41,7 @@ struct ConfigSection #define SECTION_PEER_CONNECT_LOW_WATER "peer_connect_low_water" #define SECTION_PEER_IP "peer_ip" #define SECTION_PEER_PORT "peer_port" +#define SECTION_PEER_PROXY_PORT "peer_port_proxy" #define SECTION_PEER_PRIVATE "peer_private" #define SECTION_PEER_SCAN_INTERVAL_MIN "peer_scan_interval_min" #define SECTION_PEER_SSL_CIPHER_LIST "peer_ssl_cipher_list"