HelloZeroNet / ZeroNet

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

Add obfs4 binary and edit torrc for bridge support #487

Open Arcturus36 opened 8 years ago

Arcturus36 commented 8 years ago

It seems the coffee shop I visit doesn't like tor, and blocked it on their wifi. I didn't notice this until recently, as I normally use obfs4 by default. This is annoying, as it blocks zeronet.

Yawning's obfs4 project can be found here, and the binary can be extracted from the tor browser bundle. We can place it in ZeroBundle\ZeroNet\tools\tor\data and edit the torrc as follows.

# Tell tor where obfsproxy resides
ClientTransportPlugin obfs2,obfs3,obfs4,scramblesuit exec data\obfs4proxy

# Uncomment this line to enable bridges
# UseBridges 1

# Add bridges below
up4 commented 8 years ago

Wouldn't it be better to pressurize Tor to include it as default in their binary distributions and config ? What are their reasons for not doing so ? Most ZeroNet users are not configuring their tor proxy properly anyways so I think better Tor education might be more productive than silently fixing it for the user whenever possible…

Arcturus36 commented 8 years ago

obfs4 is a separate project, run and maintained independently of the Tor Project. When Zeronet is first run, it downloads the tor expert bundle from the Tor project site. This includes nothing but the tor binary. Unfortunately, this means zeronet doesn't gain obfsproxy support. I'm still working on the code to automatically extract and place the necessary files from the normal Tor Browser Bundle. Also, since obfs4 is a separate binary, it doesn't close when zeronet closes. This causes the bundled tor binary to hang if zeronet starts again. The solution to this is to find and close tor's child processes.

up4 commented 8 years ago

Yes but all of this breaks Tor+obfs4 installations that are already setup correctly (well, not quite "break" but you get my meaning). I would do the opposite. De-couple ZeroNet from Tor and not package Tor with the ZeroNet bundle altogether. Or make a "n00b" distribution that contains everything and a "pro" distribution that lets you configure your Tor proxy the way you want, with some recommendations perhaps. AND when it comes to Tor support I think #504 more urgent an issue than including obfs4 in the ZeroNet distro. OR, let the Python stack be the n00b stack and the libzeronet-based distro I'm making ( #254 ) be the "pro" version of ZeroNet. ;-)

ghost commented 7 years ago

IMO https://github.com/HelloZeroNet/ZeroNet and https://github.com/HelloZeroNet/ZeroBundle already achieve this separation.

In any case it's best to report bundling problems in the bundle repository : https://github.com/HelloZeroNet/ZeroBundle