pull/push over tor working now

Still a couple bugs:

* Closing the connection to the server leaves git upload-pack /
  receive-pack running, which could be used to DOS.

* Sometimes the data is transferred, but it fails at the end, sometimes
  with:

  git-remote-tor-annex: <socket: 10>: commitBuffer: resource vanished (Broken pipe)

  Must be a race condition around shutdown.
This commit is contained in:
Joey Hess 2016-11-21 19:24:55 -04:00
parent 070fb9e624
commit 6b992f672c
No known key found for this signature in database
GPG key ID: C910D9222512E3C7
4 changed files with 116 additions and 115 deletions

View file

@ -17,8 +17,12 @@ import qualified Data.ByteString.UTF8 as BU8
import qualified System.Random as R
type OnionPort = Int
newtype OnionAddress = OnionAddress String
deriving (Show)
type OnionSocket = FilePath
type UniqueIdent = String
connectHiddenService :: OnionAddress -> OnionPort -> IO Socket