mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
net: open p2p connections to nodes that listen on non-default ports
By default, for mainnet, the p2p listening port is 8333. Bitcoin Core has a strong preference for only connecting to nodes that listen on that port. Remove that preference because connections over clearnet that involve port 8333 make it easy to detect, analyze, block or divert Bitcoin p2p traffic before the connection is even established (at TCP SYN time). For further justification see the OP of: https://github.com/bitcoin/bitcoin/pull/23306
This commit is contained in:
@@ -247,4 +247,13 @@ void InterruptSocks5(bool interrupt);
|
||||
*/
|
||||
bool Socks5(const std::string& strDest, uint16_t port, const ProxyCredentials* auth, const Sock& socket);
|
||||
|
||||
/**
|
||||
* Determine if a port is "bad" from the perspective of attempting to connect
|
||||
* to a node on that port.
|
||||
* @see doc/p2p-bad-ports.md
|
||||
* @param[in] port Port to check.
|
||||
* @returns whether the port is bad
|
||||
*/
|
||||
bool IsBadPort(uint16_t port);
|
||||
|
||||
#endif // BITCOIN_NETBASE_H
|
||||
|
||||
Reference in New Issue
Block a user