spesmilo / spesmilo/electrum

Differences between normal proxy and Tor proxy in config file

Open
#4,674 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement ✨ topic-network 🕸 user-interface 🔲
Dominant language
Python
Stars
8.6k
Forks
3.5k
Avg merge
2d 8h
Merged PRs (30d)
61

Description

In the network dialog we have 2 options:

  • Use Tor proxy
  • Use proxy

Somehow we can tell Electrum explicitly that it's a Tor socks5 proxy so it will prefer .onion servers. This is optimal when running Electrum with Tor because connecting to clearnet Electrum servers could end up in congesting many Electrum users behind high-consensus weight Tor exit relays, looking to the Electrum server as one abusive IP address.

I don't know how can we differentiate a normal socks5 proxy from a Tor socks5 proxy just by looking at the config:

If only use proxy is set to localhost:9050, this is the config (Use Tor Proxy is NOT checked) we have this:
"proxy": "socks5:localhost:9050::",

If we check "Use Tor proxy", we have this:
"proxy": "socks5:127.0.0.1:9050::",

The auto-detection of Tor is great but there is no visible difference just by reading the config line. My suggestion is to add some kind of flag on the socks5 proxy if it's Tor, so Electrum will treat like it and prefer .onion servers. Just guessing it's Tor if socks5 port = 9050 or = 9150 is not sufficient because:
a) Tor socksport can be run on any port;
b) A normal socks5 proxy (non Tor) can be run on port 9050 or 9150

I suggest something like:
"proxy":"tor-socks5:ip:port::",

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the network dialog and the configuration handling for the proxy values shown in the issue, then trace the Tor auto-detection and server-selection behavior. Define how an explicit Tor proxy flag should be represented without relying on the port, and consider the work complete when Tor proxies reliably prefer .onion servers while normal SOCKS5 proxies do not.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.