-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(comms): tcp-only p2p protocol listener (#3127)
<!--- Provide a general summary of your changes in the Title above --> ## Description <!--- Describe your changes in detail --> - Allow an optional "auxilary" TCP listener to be configured on the base node, in addition to the usual transport. - Allow the SOCKS transport to have a set of addresses that "bypass" the SOCKS proxy and protocol, and instead directly connect using TCP. - Configuration for base node and wallet are hooked up for these. - Remove `ConnectionManagerEvent::Listen` and `ConnectionManagerEvent::ListenFailed` events. These are replaced by a simpler 'wait_until_listening' call in the connection manager handle that waits for both listeners. - Add `[app].[network].auxilary_tcp_listener_address` config item - Add `[app].[network].tor_proxy_bypass_addresses` config item ## Motivation and Context <!--- Why is this change required? What problem does it solve? --> <!--- If it fixes an open issue, please link to the issue here. --> Allow wallet and base node to communicate directly  wallet: ```toml # set local address in the UI, or as a seed here: peer_seeds = ["f27a6ae0321b471d1f65988ded21c48dc57a71edebb936837db1302a91ddc122::/dns4/my-basenode/tcp/9998"] # Because the tor transport still (correctly) uses the tor network for DNS/IP addresses, we have to explicitly list which addresses to bypass. tor_proxy_bypass_addresses = ["/dns4/my-basenode/tcp/9998"] ``` base node: ```toml auxilary_tcp_listener_address = "/ip4/127.0.0.1/tcp/9998" ``` The config will need to be updated when #3121 is merged ## How Has This Been Tested? <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> - New connection manager unit test - Tested using configured console wallet and base node ## Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> * [x] I'm merging against the `development` branch. * [x] I have squashed my commits into a single commit.
- Loading branch information
Showing
34 changed files
with
559 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.