Bitcoin Forum
November 10, 2024, 07:28:52 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 »  All
  Print  
Author Topic: [Electrum] Tor service at 4lhnnupincd3gyda.onion:50001  (Read 26887 times)
slush (OP)
Legendary
*
Offline Offline

Activity: 1386
Merit: 1097



View Profile WWW
September 26, 2012, 11:29:10 PM
 #1

Hi,

I just started Tor hidden service running Electrum server on 4lhnnupincd3gyda.onion:50001. Now you can use Electrum client without revealing your real identity and without a need of Tor exit nodes.

1. Install Tor
2. Run electrum 1.0 as: "electrum -p socks5:localhost:9050" (point Electrum client to your local Tor node)
3. View->Pro mode
4. Click to "Network" icon in right bottom corner and put "4lhnnupincd3gyda.onion:50001:t" into "Connect to" field.


marcus_of_augustus
Legendary
*
Offline Offline

Activity: 3920
Merit: 2349


Eadem mutata resurgo


View Profile
September 27, 2012, 02:38:13 AM
 #2

Hi,

I just started Tor hidden service running Electrum server on 4lhnnupincd3gyda.onion:50001. Now you can use Electrum client without revealing your real identity and without a need of Tor exit nodes.

1. Install Tor
2. Run electrum 1.0 as: "electrum -p socks5:localhost:9050" (point Electrum client to your local Tor node)
3. View->Pro mode
4. Click to "Network" icon in right bottom corner and put "4lhnnupincd3gyda.onion:50001:t" into "Connect to" field.



Good work slush ... I'll be checking this out. Should be no need for polipo or privoxy, since electrum doesn't use http traffic right ... or?

slush (OP)
Legendary
*
Offline Offline

Activity: 1386
Merit: 1097



View Profile WWW
September 27, 2012, 02:46:56 AM
 #3

Exactly, Tor itself is enough.

BkkCoins
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1009


firstbits:1MinerQ


View Profile WWW
September 29, 2012, 04:29:47 AM
 #4

Did you see my suggestion in the Electrum thread of maybe having onion server urls show up when the user has selected SOCKS5 mode in the network dialog? I think that could work.

Or possibly when you choose the onion address it auto-selects SOCKS5 mode for you with correct port. Although in that case it should put a msg that you actually need Tor to use this server. It could list the onion url with "[Tor Required]" appended into the line to be clear.

I could make this change and submit it as a pull request if that's what you had in mind.

The available server list is propagated thru IRC. I haven't looked at that but I believe it would work as well for onion urls and then it's just a matter of making it user friendly. If your server isn't announcing itself thru IRC maybe there is some issue with onion addresses.

BkkCoins
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1009


firstbits:1MinerQ


View Profile WWW
September 30, 2012, 11:40:28 AM
Last edit: September 30, 2012, 11:57:12 AM by BkkCoins
 #5

Having looked now at the electrum-server code (server.py) I see that the problem is the config "host" variable is used both for publishing the host address and also for binding the server listen processes.

In order to get onion names to be published a small change would be needed. Host can still be used for publishing and would have the onion name, but a new one, perhaps called "bind", would need to be set to the local host value to use.

It appears this would be easy to do but since I'm not all set up to test this it's really better someone else makes the change, tests and sends a pull request.

It also occurred to me as a workaround that you could probably put your onion name in your hosts file and map it to your public IP. That may allow the gethostname lookup to bind it correctly to your public IP. Then you would put the onion name for host and it would get published as desired.

It seems to me that if you want both a Tor and non-Tor service as well then the code needs to be able to publish two host values for the one server. That would be another good change IMO.

(Is the onion name operable right now? I tried using it a few times and it never seems to work, for me anyway. But connecting to regular servers via Tor works fine.)

slush (OP)
Legendary
*
Offline Offline

Activity: 1386
Merit: 1097



View Profile WWW
September 30, 2012, 08:33:25 PM
 #6

Having looked now at the electrum-server code (server.py) I see that the problem is the config "host" variable is used both for publishing the host address and also for binding the server listen processes.

Yes, that's my problem. I'm running the same node over standard network and over Tor network, but Electrum server don't give me a chance to propagate alternative URLs. Maybe that won't be so hard to add, simply add new config directive and publish these URLs in IRC details?

Quote
In order to get onion names to be published a small change would be needed. Host can still be used for publishing and would have the onion name, but a new one, perhaps called "bind", would need to be set to the local host value to use.

Binding to multiple interfaces isn't necessary. If somebody want to run Electrum over multiple external IPs, it can be achieved by firewall/router configuration. No need of direct support in server for this...

Quote
It seems to me that if you want both a Tor and non-Tor service as well then the code needs to be able to publish two host values for the one server. That would be another good change IMO.

I prefer to publish more URLs for one IRC nick, just to make clear that all URLs are pointing to the same node. This solution will be also cleaner for backward compatibility. I'm not sure how will old (=existing) Electrum clients handle URLs poining to ".onion" domain. But they'll surely ignore additional information in IRC details...

Quote
(Is the onion name operable right now? I tried using it a few times and it never seems to work, for me anyway. But connecting to regular servers via Tor works fine.)

It works for me now. You can try "torify telnet 4lhnnupincd3gyda.onion 50001"...

BkkCoins
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1009


firstbits:1MinerQ


View Profile WWW
September 30, 2012, 11:17:59 PM
Last edit: October 01, 2012, 12:40:33 AM by BkkCoins
 #7

Having looked now at the electrum-server code (server.py) I see that the problem is the config "host" variable is used both for publishing the host address and also for binding the server listen processes.

Yes, that's my problem. I'm running the same node over standard network and over Tor network, but Electrum server don't give me a chance to propagate alternative URLs. Maybe that won't be so hard to add, simply add new config directive and publish these URLs in IRC details?

I was thinking more about this later and thought perhaps a good solution would be to make the hosts config item a list. Then the first one could be used for binding and any additional URLs could be passed thru as aliases to IRC.
eg.
"hosts": [ "california.stratum.bitcoincz:50001", "4lhnnupincd3gyda.onion:50001" ]

This would be fairly minor code changes as far as I can see. It could auto-detect string or list to be compatible with any existing install. In order for me to test changes I think I would have to install and run Bitcoin-Abe again as I wiped it some months ago. I can do that but it will take quite some time to fill the database.

Quote
I prefer to publish more URLs for one IRC nick, just to make clear that all URLs are pointing to the same node. This solution will be also cleaner for backward compatibility. I'm not sure how will old (=existing) Electrum clients handle URLs poining to ".onion" domain. But they'll surely ignore additional information in IRC details...
From my brief reading of the code it seems the client just adds whatever URL is given to the list. But if a list of URLs was used the code would have to be updated to detect it and iterate.

Quote
(Is the onion name operable right now? I tried using it a few times and it never seems to work, for me anyway. But connecting to regular servers via Tor works fine.)

It works for me now. You can try "torify telnet 4lhnnupincd3gyda.onion 50001"...
Will try this again.

Edit: I forked electrum-server and was going to work on changes but see now that it'll take a lot more effort to get it up and running and I'll have to do it on one of my other servers, not my laptop. I'll have to rebuild bitcoind with a patch and have a mysql db available. So this will be delayed. I'm willing to make code changes now that someone else (slush?) can test to see if we can get support for publishing the onion name.

Also, see now that the format for config isn't correct. Not the same as electrum client. So it would actually need to be more like,

hosts = california.stratum.bitcoincz:50001, 4lhnnupincd3gyda.onion:50001

but should still be workable.

BkkCoins
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1009


firstbits:1MinerQ


View Profile WWW
October 01, 2012, 12:41:57 AM
 #8

Tested using onion name just now and it worked fine.

Strange thing is the client doesn't have any way to show what server is currently connected. So I'll fix that soon. It seems when you open the network dialog it chooses a new random server but doesn't say which one is active. You can get an indication in the Lite mode menu list but that doesn't show any server entered manually, only the predefined listed ones.

IMO the server status should be in the tooltip for the Network config, and indicated in the dialog once opened.

stepkrav
Full Member
***
Offline Offline

Activity: 188
Merit: 100



View Profile
October 17, 2012, 11:36:10 AM
 #9

"electrum -p socks5:localhost:9050" doesn't work for me.
gives : electrum: error: no such option: -p  Undecided
slush (OP)
Legendary
*
Offline Offline

Activity: 1386
Merit: 1097



View Profile WWW
October 17, 2012, 01:06:00 PM
 #10

"electrum -p socks5:localhost:9050" doesn't work for me.
gives : electrum: error: no such option: -p  Undecided

Are you using latest electrum?

stepkrav
Full Member
***
Offline Offline

Activity: 188
Merit: 100



View Profile
October 18, 2012, 05:36:35 PM
 #11

"electrum -p socks5:localhost:9050" doesn't work for me.
gives : electrum: error: no such option: -p  Undecided

Are you using latest electrum?

electrum/precise uptodate 1.0
BkkCoins
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1009


firstbits:1MinerQ


View Profile WWW
October 19, 2012, 12:22:39 AM
 #12

"electrum -p socks5:localhost:9050" doesn't work for me.
gives : electrum: error: no such option: -p  Undecided

Are you using latest electrum?

electrum/precise uptodate 1.0
Unless I didn't hear of an update to available Ubuntu packages I don't think they currently have the latest version.

You would have to install from github using the master branch.
On this page,

http://electrum-desktop.com/download.html

You should follow the "build from source" instructions. It looks more complicated but should only takes a minute or less. It uses "git clone" to pull from the current master branch.

stepkrav
Full Member
***
Offline Offline

Activity: 188
Merit: 100



View Profile
October 19, 2012, 12:53:38 PM
 #13

yeah you're right. github's updated version works fine and is more cool also. Thanks.
Red Emerald
Hero Member
*****
Offline Offline

Activity: 742
Merit: 500



View Profile WWW
January 06, 2013, 10:54:33 PM
 #14

Is your hidden service down?

I just put one up at "k3m4jg4irk7duq2q.onion" and was trying to use yours to test.  It's running on a small ec2 instance.

slush (OP)
Legendary
*
Offline Offline

Activity: 1386
Merit: 1097



View Profile WWW
January 07, 2013, 07:38:08 AM
 #15

Hm, Tor service freezed for some reason. It should work again.

don giovanni
Member
**
Offline Offline

Activity: 80
Merit: 10


View Profile
February 12, 2013, 05:23:33 AM
 #16

So whats the difference between connecting to a hidden service and connecting to a default server over SSL/HTTPS via tor?
tnkflx
Sr. Member
****
Offline Offline

Activity: 349
Merit: 250


View Profile
February 12, 2013, 09:05:28 AM
 #17

So whats the difference between connecting to a hidden service and connecting to a default server over SSL/HTTPS via tor?

When connecting to a hidden service, the connection never leaves the Tor network.

| Operating electrum.be & us.electrum.be |
stepkrav
Full Member
***
Offline Offline

Activity: 188
Merit: 100



View Profile
April 01, 2013, 08:14:39 PM
 #18

one more electrum hidden service  : 56ckl5obj37gypcu.onion
Enjoy!
tnkflx
Sr. Member
****
Offline Offline

Activity: 349
Merit: 250


View Profile
April 02, 2013, 05:53:20 AM
 #19

I'll see whether I can set up some monitoring for the .onion addresses...

| Operating electrum.be & us.electrum.be |
UPENtXF
Member
**
Offline Offline

Activity: 125
Merit: 10


View Profile
May 16, 2013, 01:32:43 PM
 #20

Which Tor Electrum still works? The only one that I can connect to is 56ckl5obj37gypcu.onion, and even that one only says "Syncrhonizing" and hasn't yet.

I am using 1.73.

"To change something, build a new model that makes the existing model obsolete." -Buckminster Fuller
https://bisq.network/
Pages: [1] 2 3 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!