summaryrefslogtreecommitdiff
path: root/Utility
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-11-21 19:24:55 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-11-21 19:24:55 -0400
commit1100263e70da68607882e7a63d945e0a1f1fea90 (patch)
tree6f845352f3c3dd2fc155685d77ca952a5a9827db /Utility
parent01bf227ad1d9bd30d6fad2dc104b264a1f55c2c4 (diff)
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.
Diffstat (limited to 'Utility')
-rw-r--r--Utility/Tor.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Utility/Tor.hs b/Utility/Tor.hs
index eedee8c6b..0900fb87e 100644
--- a/Utility/Tor.hs
+++ b/Utility/Tor.hs
@@ -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