actually check p2p authtokens for tor connections

This commit was sponsored by Ethan Aubin.
This commit is contained in:
Joey Hess 2016-11-30 16:38:16 -04:00
parent b88e44ea9a
commit e714e0f67a
No known key found for this signature in database
GPG key ID: C910D9222512E3C7
3 changed files with 49 additions and 29 deletions

View file

@ -60,7 +60,13 @@ connectService address port service = do
myuuid <- getUUID
g <- Annex.gitRepo
h <- liftIO $ torHandle =<< connectHiddenService address port
runNetProtoHandle h h g $ do
let runenv = RunEnv
{ runRepo = g
, runCheckAuth = const False
, runIhdl = h
, runOhdl = h
}
runNetProtoHandle runenv $ do
v <- auth myuuid authtoken
case v of
Just _theiruuid -> connect service stdin stdout