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

Tor: Fix proxy bypass for stem version 1.8.0 #2115

Merged
merged 1 commit into from
Dec 30, 2020

Conversation

EchterAgo
Copy link

Stem release 1.8.0 moved to using asyncio, breaking our method of preventing the Tor control connection going through Tor itself.

To fix this we introduce a new general proxy bypass mechanism that checks the list network.bypass_proxy_filters, calling each function in it. If any of the functions returns true, a normal socket instead of a proxied socket will be returned.

The Tor controller provides such a filter that is installed by default and returns True when called from stem.socket.ControlPort.

Stem release 1.8.0 moved to using `asyncio`, breaking our method of
preventing the Tor control connection going through Tor itself.

To fix this we introduce a new general proxy bypass mechanism that
checks the list `network.bypass_proxy_filters`, calling each function in
it. If any of the functions returns true, a normal socket instead of a
proxied socket will be returned.

The Tor controller provides such a filter that is installed by default
and returns True when called from `stem.socket.ControlPort`.
@cculianu
Copy link
Collaborator

This is insane in that it checks what is calling it in order to return different things! I love it! Nice.

@cculianu cculianu merged commit a7d345e into Electron-Cash:master Dec 30, 2020
@EchterAgo EchterAgo deleted the stem_proxy_bypass branch December 30, 2020 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants