mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 14:08:40 +01:00
Merge bitcoin/bitcoin#23542: net: open p2p connections to nodes that listen on non-default ports
36ee76d1afnet: remove unused CNetAddr::GetHash() (Vasil Dimov)d0abce9a50net: include the port when deciding a relay destination (Vasil Dimov)2e38a0e686net: add CServiceHash constructor so the caller can provide the salts (Vasil Dimov)97208634b9net: open p2p connections to nodes that listen on non-default ports (Vasil Dimov) Pull request description: 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 ACKs for top commit: laanwj: Concept and light code review ACK36ee76d1afprayank23: ACK36ee76d1afstickies-v: tACK36ee76d1ajonatack: ACK36ee76d1afglozow: utACK36ee76d1afTree-SHA512: 7f45ab7567c51c19fc50fabbaf84f0cc8883a8eef84272b76435c014c31d89144271d70dd387212cc1114213165d76b4d20a5ddb8dbc958fe7e74e6ddbd56d11
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