Whitelisting outgoing connections #9923

issue laanwj openend this issue on March 5, 2017
  1. laanwj commented at 3:51 pm on March 5, 2017: member

    I think it should be possible to optionally whitelist outgoing connections - specifically those that are explicitly created through connect, addnode. Context: I regularly need to bypass this code in testing setups to be able to sync non-internet connected nodes: https://github.com/bitcoin/bitcoin/blob/master/src/net_processing.cpp#L1720

    Also in the interest of symmetry I don’t see why whitelisting would only apply to incoming connections.

  2. laanwj added the label P2P on Mar 5, 2017
  3. jnewbery commented at 8:55 pm on March 6, 2017: contributor

    As it happens, I have a branch that allows nodes to be whitelisted through an RPC: https://github.com/jnewbery/bitcoin/tree/updatenode .

    Context: the RPC is called updatenode so that it can be extended in future, eg to update the banscore for a node, or disconnect a node based on node id (at the moment, nodes can only be disconnected based on ip address).

    I haven’t written any testcases for this yet, but feel free to take it if it’s helpful for your testing.

  4. laanwj commented at 7:12 am on March 7, 2017: member

    That seems useful in general.

    I’m a little afraid that won’t work for my use-case because of the race between toggling ‘whitelist’ to 1 and making the connection. The other side will immediately send a getheaders, which could get ignored if it’s not in time (and IIRC it won’t send any, ever again, after that).

  5. laanwj commented at 8:13 am on March 7, 2017: member
    Another option here would be to make the -whitelist netmask apply to outgoing connections as well. It seems straightforward but that may be an unexpected change of behavior.
  6. Sjors commented at 10:32 am on August 6, 2019: member
    Duplicate of #4565
  7. maflcko referenced this in commit 1d74693e8a on Aug 19, 2019
  8. sidhujag referenced this in commit 84228bdcc4 on Aug 19, 2019
  9. vijaydasmp referenced this in commit df0665137e on Oct 27, 2021
  10. vijaydasmp referenced this in commit 2e8b792965 on Oct 28, 2021
  11. vijaydasmp referenced this in commit 7b75d5c9df on Oct 29, 2021
  12. vijaydasmp referenced this in commit b113e72ecc on Oct 30, 2021
  13. vijaydasmp referenced this in commit 53f792edd1 on Nov 2, 2021
  14. vijaydasmp referenced this in commit 514c0bf08b on Nov 7, 2021
  15. vijaydasmp referenced this in commit 221e4769e8 on Nov 11, 2021
  16. vijaydasmp referenced this in commit 757494e339 on Nov 12, 2021
  17. vijaydasmp referenced this in commit 4e4e417ed2 on Nov 13, 2021
  18. vijaydasmp referenced this in commit 85a8810b69 on Nov 14, 2021
  19. vijaydasmp referenced this in commit 313a4606a6 on Nov 14, 2021
  20. vijaydasmp referenced this in commit 52a577891e on Nov 16, 2021
  21. gades referenced this in commit 0a5afa9764 on Nov 20, 2023
  22. gades referenced this in commit 50a180058c on Dec 9, 2023
  23. achow101 closed this on Mar 12, 2024

  24. mzumsande referenced this in commit bef99176e6 on Mar 12, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me