Added git-remote-tor-annex, which allows git pull and push to the tor hidden service.

Almost working, but there's a bug in the relaying.

Also, made tor hidden service setup pick a random port, to make it harder
to port scan.

This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
This commit is contained in:
Joey Hess 2016-11-21 17:27:38 -04:00
parent 9cf9ee73f5
commit 070fb9e624
No known key found for this signature in database
GPG key ID: C910D9222512E3C7
17 changed files with 254 additions and 61 deletions

View file

@ -12,6 +12,7 @@ import RemoteDaemon.Types
import RemoteDaemon.Common
import Utility.Tor
import Utility.FileMode
import Remote.Helper.Tor
import Remote.Helper.P2P
import Remote.Helper.P2P.IO
import Annex.UUID
@ -43,9 +44,6 @@ server th@(TransportHandle (LocalRepo r) _) = do
(conn, _) <- accept soc
forkIO $ do
debugM "remotedaemon" "handling a connection"
h <- socketToHandle conn ReadWriteMode
hSetBuffering h LineBuffering
hSetBinaryMode h False
h <- torHandle conn
runNetProtoHandle h h r (serve u)
hClose h