This commit is contained in:
Joey Hess 2016-12-06 15:40:31 -04:00
parent 26a53fb4a5
commit f744bd5391
No known key found for this signature in database
GPG key ID: C910D9222512E3C7
7 changed files with 74 additions and 86 deletions

View file

@ -12,7 +12,6 @@ import qualified Annex
import qualified Git.CurrentRepo
import P2P.Protocol
import P2P.IO
import Remote.Helper.Tor
import Utility.Tor
import Utility.AuthToken
import Annex.UUID
@ -59,14 +58,8 @@ connectService address port service = do
<$> loadP2PRemoteAuthToken (TorAnnex address port)
myuuid <- getUUID
g <- Annex.gitRepo
h <- liftIO $ torHandle =<< connectHiddenService address port
let runenv = RunEnv
{ runRepo = g
, runCheckAuth = const False
, runIhdl = h
, runOhdl = h
}
liftIO $ runNetProto runenv $ do
conn <- liftIO $ connectPeer g (TorAnnex address port)
liftIO $ runNetProto conn $ do
v <- auth myuuid authtoken
case v of
Just _theiruuid -> connect service stdin stdout