Skip to content

feat: configurable tor obsf4 bridge #239

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

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
Draft

Conversation

binarybaron
Copy link

@binarybaron binarybaron commented Jan 2, 2025

No description provided.

@binarybaron
Copy link
Author

While we're at it we should also allow disabling tor entirely

@binarybaron
Copy link
Author

binarybaron commented Jan 19, 2025

Okay it turns out that arti does not have native support obsf4 (protocol to obscure our traffic to the bridge relay to make it less detectable by packet sniffers) yet :( We need to bundle a binary called obfs4proxy...

Tor Browser bundles a binary called lyrebird which offers the same functionality and is a drop-in replacement. We could instruct the user to have Tor Browser installed and then use the binary. On darwin it's located at /Applications/Tor Browser.app/Contents/MacOS/Tor/PluggableTransports/lyrebird.

On darwin / linux you can also install obfs4proxy which implements the same functionality (brew install obfs4proxy / sudo apt install obfs4proxy)

However I was very glad we did not have to put up with external binaries anymore... For mobile support this'll also not work. I'm unsure how to proceed. What do you think @Einliterflasche ?

@Einliterflasche
Copy link

Einliterflasche commented Jan 19, 2025

This is unfortunate... I agree that bundling a binary is not something we would want to do. A potential problem I see is that we might not be able to rely on the default path. In my experience installing tor on windows really just gives a folder with the executable; and the folder can be anywhere.

We could build a UI to where we check at different locations or a user can input a specific path.

@darkness-su
Copy link

darkness-su commented Jan 25, 2025

I recommend adding "use own Tor" checkbox instead which does SOCKS5 to 127.0.0.1:9050 and recommending users to start their Tor Browser and keep it running, will be less complicated than telling to use a specific binary they have to find the location of, browser automatically provides socks functionality when running and will of course use the settings already used by the user

This would also allow more advanced users to use their own Tor daemon and build more secure configuration

@EPtoMEnt
Copy link

EPtoMEnt commented Feb 6, 2025

I recommend adding "use own Tor" checkbox instead which does SOCKS5 to 127.0.0.1:9050

Tor Browser uses 9150 where as tor (daemon) runs on 9050 by default. It should probably be user configurable with 9150 being default

@lex0317
Copy link

lex0317 commented Feb 10, 2025

Yes, pls make it user configurable with 9150 being default. as in some configurations stream isolations needed if many apps run simultan, so you can run every app with an own Tor Circuit

@binarybaron
Copy link
Author

I see your point. I really do but it introduces so much extra complexity... I'll have to think about it.

@Einliterflasche Einliterflasche changed the title feat: User configurable tor obsf4 bridge feat: configurable tor obsf4 bridge Mar 22, 2025
Before, monero::Wallet wrapped a Mutex<Client>, and locked
the mutex on each operation. This meant releasing the
lock in between operations, even though we rely on the
operations being executed in order.

To remedy this race condition, we wrap monero::Wallet itself
in a mutex, requiring any caller to hold the lock for the duration
of the operation, including any suboperations.
@binarybaron
Copy link
Author

Converting this to a draft for now. I don't want to introduce this much extra complexity to the codebase at the moment.

@binarybaron binarybaron marked this pull request as draft April 18, 2025 13:05
@Einliterflasche
Copy link

In that case we should introduce a new pr that simply allows disabling tor until we can get back to this. #266 for example is a common problem, I think and the fix is easy enough that we shouldn't postpone it.

@binarybaron
Copy link
Author

In that case we should introduce a new pr that simply allows disabling tor until we can get back to this. #266 for example is a common problem, I think and the fix is easy enough that we shouldn't postpone it.

Shouldn't be hard to implement. The code is structured such that the tor client can be None.

@Einliterflasche
Copy link

Implemented the toggle in #300

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants