-
Notifications
You must be signed in to change notification settings - Fork 906
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gossipd: use remote addr #5052
gossipd: use remote addr #5052
Conversation
f38fe5f
to
d56a23e
Compare
501f6d7
to
9edb967
Compare
just solved conflicts and rebased on master b5a1715 |
I don't think an IPv4 self-connection is reliable either. At least with older Linux NAT setups it won't work; I'm surprised it does for you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice series! Some minor feedback only (and needs trivial rebase).
"announcable" is a common misspelling of "announceable", see: https://en.wiktionary.org/wiki/announcable
Changelog-None
When compiled without DEVELOPER this will now filter out `remote_addr` that come from localhost. The testcase checks for DEVELOPER to test for correct function of `remote_addr`. Also, I renamed "test_connect" to "test_connect_basic" so it can be started without all the other tests in that file that start with "test_connect..."
Adds wireaddr_eq_without_port so it can be used later. Moves wireaddr_cmp_type from connectd.c to this file, so it can be reused later.
This is the cheapest algo I came up with that simply checks that the same `remote_addr` has been report by two different peers. Can be improved in many ways: - Check by connecting to a radonm peers in the network - Check for more than two confirmations or a certain fraction - ... Changelog-Added: Send updated node_annoucement when two peers report the same remote_addr.
Increases test coverage by adding a testcase for connectd/netaddress.c Changelog-None
9edb967
to
4dff537
Compare
f4ed33f
to
dda19f5
Compare
Ack dda19f5 Thanks! |
I think it might not be a desire behavior for a lot of people due to privacy leak. I use tor + always-use-proxy=false to have some sort of privacy and better performance when peering with clearnet nodes (they should be the only ones who knows my clearnet addr from what I understand). However, when c-lightning announces my address, the entire network knows it, and sites like amboss pick it up make a public record that last forever. Even though my clearnet address is unreachable as I don't NAT, but people now easily knows my home. It's a smart feature, but if it turns on by default, I can see node operators be in shock after update. |
@heyambob @rustyrussell Currently (without this PR), if you use a TOR but without
Also your node can and will do other requests that reveal your IP without My assumption is that 99% of the people that use TOR without |
Right. My concern is for people who want to keep low profile, not for those who want to stay anonymous.
Initially, people play around, they might not care so much. Once they get comfortable and commit a meaningful liquidity to be a useful node, they could be regret. At least there has to be |
What it does:
This is the second part of the "IP discovery by remote peer feature" that actually uses the
remote_addr
field to createnode_annoucement
updates when clightning detects that our peers report the same newremote_addr
.Currently implements the most simple algorithm I came up with that just checks:
remote_addr
node_announcement
There is a failsafe that prevents this code from running when we have
always_use_proxy
enabled. Normally, this code would not be executed for TOR connections as a TOR node would not set theremote_addr
to something useful other than a TOR string that we would ignore, but a nefarious TOR node may respond (thorugh the proxy) with a init TLV having an IPremote_addr
set that we would otherwise use.NextSteps/Todos:
remote_addr
qickly.Questions:
remote_addr
to send updatednode_announcement
?This is decision has tradeoffs. In general it is not harmful to announce one additional address that is potentially unreachable (if the port at the router is not open). However it would affect everyone. Having a config switch increases the complexity for people using this.
Note: rusty noted we may introduce a config switch to turn that off but default to enabled.
Note: if we have a unset config switch but no announced addresses at all, we may likely also ignore the config
Note: If we have a disabled config switch, but we can make a succesful IPv4 self-connection (see above) we should ignore that config switch and send the update any way, as it will improve the situation. (not sure if