-
Notifications
You must be signed in to change notification settings - Fork 134
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 bridge + TOR Proxy + migration config_file_version #617
TOR bridge + TOR Proxy + migration config_file_version #617
Conversation
a2f2a92
to
c8d1a5d
Compare
fe7109a
to
e17761c
Compare
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.
Thanks for your effort on this! Tor bridge support is important to improve privacy and circumvent censorship when building transactions.
Took a quick pass at the code, have a few general comments/questions:
-
Am still concerned a bit about generating a new config and migrating values as some custom changes would be lost, maybe without the user realizing it will happen. Maybe someone else can weigh in here. Is there a simpler way to handle this? Maybe by expecting the bridge config line and if missing just append it to the end of the config file or something? Or am I missing something for why that can't work cleanly? Would migrating config files in this way be more or less likely to break things than appending lines to configs with potentially unknown locations/contents?
-
The logic seems to only support obfs4, it might be nice to make things more generic to support multiple bridge proxy protocols? Or make the language more clear that it only supports obfs4 bridges? Bringing this up because for example some users will use shadowsocks instead of obfs4 because they cannot obtain unblocked obfs4 bridges easily (note: while obfs4 protocol itself works fairly well behind GFW, it can be hard to obtain bridge IPs that are not already blocked by GFW..). Maybe this is meant for a future update, but at some point we may want something more of a generic
tor_bridge_proxy
which can support multiple protocols like obfs4, shadowsocks etc.
Once we decide how we want to address the above (if at all!) will make a more thorough pass.
This week I will test thoroughly on linux, it would be great if others could pick up testing on osx and windows.
Thanks again for putting this together @deevope!
No, I think deevope was planning quite a few changes and so holding off on testing until they are ready. I think deevope is maybe away for travel atm |
@j01tz @phyro Deeply sorry for the delay. |
6d3ce16
to
b23c9ed
Compare
if let Some(t) = tb.transport { | ||
let transport = t.to_lowercase(); | ||
match transport.as_str() { | ||
"socks4" | "socks5" | "http" | "https" | "http(s)" => { |
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.
Do we need to include 'socks5h' here? (See #629)
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.
The match that you commented, is just in order to parse the user input in the config file for him to choose which type of proxy he want to set. You could refer to the tor browser settings for reference. And write accordingly in the torrc config the transport, cf https://github.com/mimblewimble/grin-wallet/pull/617/files#diff-260d6fd89f30bf49927a33dffd4a77eb74479cb3b919f1f818478d1db8fa1e78R115-R144
62f9763
to
eb68a20
Compare
Still on radar, just need a day or two to check this out properly and test the configuration migration and new options, etc! |
All appears fine, at least in local testing on my machine, and thanks for doing this; this is really important. I can't guarantee this will work for all users at the moment, but we don't have a planned release for the wallet just yet, so there will be plenty of time to test this out on master and fix any issues. |
config_file_version (mimblewimble#617) * tor bridge config and args * migration `config_file_version=2` * small fixes typo, comment etc.. * support: snowflake, meek_lite, obsf4 and tor proxy * remove useless serde * improve migrate function * few fixes * add bridge flags to pay and receive + few fixes * some improvements
Solve #585
TOR Bridge
Requirements:
Wallet Configuration file
bridge_line
ingrin-wallet.toml
:CMD arguments
send
command, input the bridge info after the arg--bridge
listen
command, input the bridge info after the arg--bridge
:Migration to
config_file_version=2
Took another approach than what was done on the node side. Takes the old key-field value and migrate them in a new file and add the missing the new key-field with their default value. In this case:
config_file_version = 2
andbridge_line = ""
. Support minimal config file.