HelloZeroNet / ZeroNet

ZeroNet - Decentralized websites using Bitcoin crypto and BitTorrent network
https://zeronet.io
Other
18.27k stars 2.26k forks source link

ZeroNet should not check for open port when using --tor always #329

Open adrelanos opened 8 years ago

adrelanos commented 8 years ago
./zeronet.py --tor always
- Starting ZeroNet...
[23:14:14] - OpenSSL loaded, version: 01000206F
[23:14:14] - Patching sockets to tor socks proxy: 127.0.0.1:9050
[23:14:14] - Version: 0.3.6 r949, Python 2.7.11+ (default, Feb 22 2016, 16:38:42) 
[GCC 5.3.1 20160220], Gevent: 1.0.1
[23:14:15] - Creating FileServer....
[23:14:15] - Creating UiServer....
[23:14:15] - Removing old SSL certs...
[23:14:15] - Starting servers....
[23:14:15] Ui.UiServer --------------------------------------
[23:14:15] Ui.UiServer Web interface: http://127.0.0.1:43110/
[23:14:15] Ui.UiServer --------------------------------------
[23:14:25] FileServer Checking port 15441 using portchecker.co...

When we want to always use Tor, there is no need to check for an open port. Let alone opening a port. That should be avoided.

HelloZeroNet commented 8 years ago

It's required to check tor works correctly and returns the exit node ip. you can skip it if you want by starting --ip_external 127.0.0.1

adrelanos commented 8 years ago

But you cannot - and do not try to open a port at the Tor exit, right?

What is the test actually doing? Trying to establish an outgoing connection on that port?

HelloZeroNet commented 8 years ago

It connects to a service that is returns your external ip (tor exit node) and checks if the file server port is opened (always returns no when using tor)

adrelanos commented 8 years ago

But if it is always expected to fail, then why not skip test and skip the opening of the port when using --tor always?

HelloZeroNet commented 8 years ago

because it's returns your external ip (exit node), which is used in some places

i don't see why is it a problem

sermont commented 8 years ago

this is interesting. do you need to know your public IP for zeronet to work? what do you need it for?

HelloZeroNet commented 8 years ago

It's puts own ip to blacklist, so dont try to connect/publish modifications to itself

TheNain38 commented 8 years ago

@HelloZeroNet But in the case of --tor always you don't use clearnet IPs, you only use HS, so it doesn't serve any purpose in this case...

HelloZeroNet commented 8 years ago

Not much, but I dont see why is it a problem. It also puts your on the map and on sidebar and you can make check your exit node ip using /Stats

TheNain38 commented 8 years ago

@HelloZeroNet But it is making a connection to a clearnet service, which is bad, because if you use HS, then use them all the way, not on "pretty much" all connections

HelloZeroNet commented 8 years ago

there is no hidden service-only mode yet, you will use exit nodes regardless if there is port checking or not, so it's not related to this topic

sermont commented 8 years ago

well, I don't know the inner workings and I see that strict anonimity may not not a purpose at the moment (AFAICS this is demanded to tor), but one could see traffic analysis issues in making specific connections to a clearnet service. this is the first thing that has come to my mind when I have seen the port checking log entry. but maybe I'm missing something

adrelanos commented 8 years ago

@adrelanos

But if it is always expected to fail, then why not skip test and skip the opening of the port when using --tor always?

@HelloZeroNet

because it's returns your external ip (exit node), which is used in some places

i don't see why is it a problem

It may technically not be a problem, but it is a usability issue. Users get confused about the red "port not open" message. That information is useless to them in such cases. Why not remove it from the web interface when using --tor always?

HelloZeroNet commented 8 years ago

Why not remove it from the web interface when using --tor always?

It displaying a green "Closed" with the description "Good, your port is always closed when using ZeroNet in Tor always mode." when you are using --tor always

adrelanos commented 8 years ago

ZeroNet:

Why not remove it from the web interface when using --tor always?

It displaying a green "Closed" with the description "Good, your port is always closed when using ZeroNet in Tor always mode." when you are using --tor always

Isn't that redundant? Anything redundant is better removed for better usability.

At very least I see no reason to have such a less important information in such a prominent spot.