Chocobozzz / PeerTube

ActivityPub-federated video streaming platform using P2P directly in your web browser
https://joinpeertube.org/
GNU Affero General Public License v3.0
13.1k stars 1.51k forks source link

PeerTube as Hidden Service #1569

Open 6543 opened 5 years ago

6543 commented 5 years ago

I like to setup PeerTube as Hidden service wich can federate to other Tor-PeerTube instances. For now i have two wich work perfect as Hidden service - but as standalone.

There are Two Issues:

6543 commented 5 years ago

an idear/notize:

what about optional tor integration for normal nodes? add an optional "tor gateway" to the config and make the case if a node has "onion" as TLD then it shoud do all routines as usual but use tor.

elevenpassin commented 5 years ago

The first concern that comes to my mind as soon as I hear about peertube on tor is, if you are doing it for privacy concerns, torporject openly expresses concern over using bittorrent on tor.

please read more about it here -> https://blog.torproject.org/bittorrent-over-tor-isnt-good-idea

6543 commented 5 years ago

This is because lot of torrent clients leak ip addresses even if a proxy is set. And ZeroNet uses Tor successfuly with torren too. So it only depends on how you implement it.

elevenpassin commented 5 years ago

@6543 I agree. But in such a case, will I be able to watch the video hosted on the tor network from an instance hosted on the normal internet?

rigelk commented 5 years ago

@buoyantair probably not. As it stands, to watch videos served over Tor your browser should be able to resolve onion addresses, or use an instance able to do so as a proxy.

First option is going to cause errors on most clients. Either we consider that too much to handle or we deal with the error gracefully/separate these videos from the rest.

While possible, the second option is already using PeerTube for some usage outside of the classic HTTP server territory, so it falls in the "yes but as a plug-in" category.

6543 commented 5 years ago

but for now, how do i just use a sock proxy? To test the node behaviour

6543 commented 5 years ago

@rigelk there wont be "bronek video entrys". I have tested to "follow" a hidden service and otherwise, but they dont conect. On the hidden one the entry stay "Pending"...

So for now it would be nice to just conect hidden once and then we can think to conect both worlds?

elevenpassin commented 5 years ago

@rigelk But then again, lets an instance is federating over tor, and another is federating over https, and they both connect to each other, in which case can I connect to the instance on https and there by access the video from tor network right? (as a peer?)

rigelk commented 5 years ago

@buoyantair right now you wouldn't be able to do that, no. PeerTube is not meant to act as a proxy.

elevenpassin commented 5 years ago

@rigelk Wouldnt that fracture the network then?

Houkime commented 5 years ago

While Peertube itself is not meant to run as a proxy, one can still write a specialized server which will act as a proxy and represent the Tor part of federation for the clearnet part, right? But in this case, how could many such bridges coexist together without appearance of duplicate videos? Does one need to make changes to protocols for such bridges to work effectively and balance the load?

6543 commented 5 years ago

If we just add config enable tor wich three options: [disable/enable/only]

If disabled PeerTube will ignore all federation requests from .onion if enabled Peertube uses SOCK Proxy for .onion hostnames If only it will forward all requests throu SOCK Proxy

how hard is it to use diffetent networks with typescript? and differ federation routines based on TLDs?

trymeouteh commented 3 years ago

Would be great for a peertube server to be able to talk to onion sites and allow anyone with a peertube account on the clear web to watch and connect to a video on an onion site.