-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
make Monero understand Tor seeds, and add one #6874
Conversation
src/p2p/net_node.inl
Outdated
|
||
if (boost::ends_with(host, ".onion")) | ||
{ | ||
epee::net_utils::network_address na{MONERO_UNWRAP(net::tor_address::make(host, (uint16_t)atoi(port.c_str())))}; // gets us 0 if not an integer, works for me |
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.
atoi
doesn't handle well "out of int range" case, the result is undefined.
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.
This should be inconsistent for Tor seed node connections. connect_to_seed()
does not take a zone
argument, so it only selects Tor seeds by "chance" when connections_maker()
determines the IP address connection count is too low. I believe both of those functions need updating.
I would not close this PR so that the Tor address is linked to a commit+PR from you. I will update those functions in a separate PR (assuming you didn't want to) - I'm obligated via the CCS proposal anyway.
src/p2p/net_node.inl
Outdated
|
||
if (boost::ends_with(host, ".onion")) |
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.
This section is now net::get_network_address
but without i2p support. Calling that function would require re-splitting host/port (that function does it internally too) if addr
is a hostname, but this section should be called infrequently anyway.
This section should be easier if get_seed_nodes()
returns a std::vector<network_address>
, I'll look into this.
Thanks, I guess I'll readd the seed once you've done those changes. |
759639c
to
b7a7fe8
Compare
Obsoleted by #7068 |
No description provided.