Skip to content
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

torcontrol: Query Tor for correct -onion configuration #15423

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
5 participants
@luke-jr
Copy link
Member

commented Feb 16, 2019

Currently, we just assume any running Tor instance provides localhost port 9050 for SOCKS, and configure -onion accordingly when we get a Tor control connection.

This actually queries the Tor node for its SOCKS listeners, and uses the configured port instead.

For backward compatibility, it falls back to localhost:9050 if it can't get any better port info. I'm not sure if that's the correct action to take when the Tor daemon explicitly says there are no ports listening...

@DrahtBot

This comment has been minimized.

Copy link
Contributor

commented Feb 16, 2019

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #15421 (torcontrol: Launch a private Tor instance when not already running by luke-jr)
  • #14729 (correct -onion default to -proxy behavior by qubenix)
  • #14425 (Net: Do not re-enable Onion network when it was disabled via onlynet by wodry)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@@ -481,6 +483,53 @@ TorController::~TorController()
}
}

void TorController::get_socks_cb(TorControlConnection& _conn, const TorControlReply& reply)
{
// NOTE: We can only get here if -onion is unset

This comment has been minimized.

Copy link
@practicalswift

practicalswift Feb 16, 2019

Member

Assert that condition?

@fanquake fanquake added the P2P label Feb 16, 2019

@kristapsk

This comment has been minimized.

Copy link
Contributor

commented May 14, 2019

Agree with @practicalswift comments, apart from that tACK 962f168 (enabled/disabled 9050 and other ports in torrc, compared behaviour between 0.18 and this).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.