summaryrefslogtreecommitdiff
path: root/RemoteDaemon
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-11-21 17:27:38 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-11-21 17:27:38 -0400
commit01bf227ad1d9bd30d6fad2dc104b264a1f55c2c4 (patch)
treef893d0e14aea0cdec4dbe04d4c4703c44be658ac /RemoteDaemon
parent849256634ad1234f9957532e0131e0e2b491bdeb (diff)
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.
Diffstat (limited to 'RemoteDaemon')
-rw-r--r--RemoteDaemon/Transport/Tor.hs6
1 files changed, 2 insertions, 4 deletions
diff --git a/RemoteDaemon/Transport/Tor.hs b/RemoteDaemon/Transport/Tor.hs
index da30bf944..e0922a766 100644
--- a/RemoteDaemon/Transport/Tor.hs
+++ b/RemoteDaemon/Transport/Tor.hs
@@ -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
-