Add peer_port_proxy to config

This commit is contained in:
Vinnie Falco
2013-08-24 21:05:58 -07:00
parent ef7cb16dcd
commit 3602e19dcd
3 changed files with 33 additions and 3 deletions

View File

@@ -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 <int> (strTemp);
else
proxyListeningPort = 0;
//
// VFALCO END CLEAN
//

View File

@@ -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.

View File

@@ -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"