mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-21 03:26:01 +00:00
Allow multiple incoming connections from the same IP:
Multiple servers behind NAT might share a single public IP, making it difficult for them to connect to the Ripple network since multiple incoming connections from the same non-private IP are currently not allowed. RippleD now automatically allows between 2 and 5 incoming connections, from the same public IP based on the total number of peers that it is configured to accept. Administrators can manually change the limit by adding an "ip_limit" key value pair in the [overlay] stanza of the configuration file and specifying a positive non-zero number. For example: [overlay] ip_limit=3 The previous "one connection per IP" strategy can be emulated by setting "ip_limit" to 1. The implementation imposes both soft and hard upper limits and will adjust the value so that a single IP cannot consume all inbound slots.
This commit is contained in:
@@ -371,11 +371,12 @@ void Config::loadFromString (std::string const& fileContents)
|
||||
(void) getSingleSection (secConfig, SECTION_VALIDATORS_SITE, VALIDATORS_SITE, j_);
|
||||
|
||||
std::string strTemp;
|
||||
|
||||
if (getSingleSection (secConfig, SECTION_PEER_PRIVATE, strTemp, j_))
|
||||
PEER_PRIVATE = beast::lexicalCastThrow <bool> (strTemp);
|
||||
|
||||
if (getSingleSection (secConfig, SECTION_PEERS_MAX, strTemp, j_))
|
||||
PEERS_MAX = beast::lexicalCastThrow <int> (strTemp);
|
||||
PEERS_MAX = std::max (0, beast::lexicalCastThrow <int> (strTemp));
|
||||
|
||||
if (getSingleSection (secConfig, SECTION_NODE_SIZE, strTemp, j_))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user