p2p: add --max-connections-per-ip daemon option

Helps daemons behind a proxy get more than one connection.
Defaults to 1 (no change)
This commit is contained in:
moneromooo-monero
2020-10-11 10:30:45 +00:00
parent c41e087d46
commit d643a865f3
3 changed files with 10 additions and 3 deletions

View File

@@ -258,7 +258,8 @@ namespace nodetool
m_igd(no_igd),
m_offline(false),
is_closing(false),
m_network_id()
m_network_id(),
max_connections(1)
{}
virtual ~node_server();
@@ -517,6 +518,8 @@ namespace nodetool
epee::net_utils::ssl_support_t m_ssl_support;
bool m_enable_dns_blocklist;
uint32_t max_connections;
};
const int64_t default_limit_up = P2P_DEFAULT_LIMIT_RATE_UP; // kB/s
@@ -551,6 +554,7 @@ namespace nodetool
extern const command_line::arg_descriptor<int64_t> arg_limit_rate_down;
extern const command_line::arg_descriptor<int64_t> arg_limit_rate;
extern const command_line::arg_descriptor<bool> arg_pad_transactions;
extern const command_line::arg_descriptor<uint32_t> arg_max_connections_per_ip;
}
POP_WARNINGS