open p2p connections to nodes that listen on non-default ports #116

Open
opened 2 years ago by duke · 1 comments
duke commented 2 years ago
Owner

https://github.com/bitcoin/bitcoin/pull/23542

This is an interesting PR to BTC Core that was just merged. Hush should think about doing something similar.

Basically, Bitcoin and all BTC forks including ZEC, HUSH and all Hush Smart Chains have logic in the internals of the p2p networking code to greatly prefer connecting to nodes that listen on the default port. This goes back to Satoshi.

This makes it easy to identify BTC/etc traffic on the network (just look at the port) and also to block it. It's better for the network to basically treat nodes that don't use the default port as the same.

I am not sure I like the exact way that BTC Core did this, specifically the huge number of "bad ports" that they don't allow. Specifically, BTC Core is thinking of finally catching up to Hush by adding encrypted p2p, so they are avoiding allowing port 443 for now to ease the migration to allowing it in the future. We don't have that problem. I believe that we can likely port this change without all the "bad port" logic, which gets rid of 95% of the code.

https://github.com/bitcoin/bitcoin/pull/23542 This is an interesting PR to BTC Core that was just merged. Hush should think about doing something similar. Basically, Bitcoin and all BTC forks including ZEC, HUSH and all Hush Smart Chains have logic in the internals of the p2p networking code to greatly prefer connecting to nodes that listen on the default port. This goes back to Satoshi. This makes it easy to identify BTC/etc traffic on the network (just look at the port) and also to block it. It's better for the network to basically treat nodes that don't use the default port as the same. I am not sure I like the exact way that BTC Core did this, specifically the huge number of "bad ports" that they don't allow. Specifically, BTC Core is thinking of finally catching up to Hush by adding encrypted p2p, so they are avoiding allowing port 443 for now to ease the migration to allowing it in the future. We don't have that problem. I believe that we can likely port this change without all the "bad port" logic, which gets rid of 95% of the code.
Poster
Owner

Looks like they only talked about making port 443 a "bad port" but that didn't make it into the final PR.

The benefit of running hushd on port 443 is that it would basically just look like a normal HTTPS web traffic, unless deep packet inspection is used. This would make Hush traffic blend into the rest of network traffic much better and also allow people to connect to the Hush network even if they have a very heavily filtered internet that doesn't allow arbirtrary ports. If HTTPS is allowed, people can access our network.

I am of the opinion that we merge this with no "bad ports", if somebody wants to run hushd on port 22 or some other weird port, that is their right to do it. This basically turns the huge BTC PR into changing a few lines of code.

Looks like they only talked about making port 443 a "bad port" but that didn't make it into the final PR. The benefit of running hushd on port 443 is that it would basically just look like a normal HTTPS web traffic, unless deep packet inspection is used. This would make Hush traffic blend into the rest of network traffic much better and also allow people to connect to the Hush network even if they have a very heavily filtered internet that doesn't allow arbirtrary ports. If HTTPS is allowed, people can access our network. I am of the opinion that we merge this with no "bad ports", if somebody wants to run hushd on port 22 or some other weird port, that is their right to do it. This basically turns the huge BTC PR into changing a few lines of code.
duke added the
feature
label 1 year ago
duke self-assigned this 1 year ago
duke added the
high priority
label 11 months ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.