diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-12-06 15:40:31 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-12-06 15:43:03 -0400 |
commit | 5258f572d494d015c6c6e60c37a215bb95048bbd (patch) | |
tree | a59d9ca7ad399b5105da152b8ee0e539582d58c3 /CmdLine | |
parent | 03a65c127403e731d7866ee3bbe397fcae7c7761 (diff) |
refactor
Diffstat (limited to 'CmdLine')
-rw-r--r-- | CmdLine/GitRemoteTorAnnex.hs | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/CmdLine/GitRemoteTorAnnex.hs b/CmdLine/GitRemoteTorAnnex.hs index 517ce7c82..c4bf26c85 100644 --- a/CmdLine/GitRemoteTorAnnex.hs +++ b/CmdLine/GitRemoteTorAnnex.hs @@ -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 |