Joey Hess
881274d021
make remote-daemon able to send and receive objects over tor
...
Each worker thread needs to run in the Annex monad, but the
remote-daemon's liftAnnex can only run 1 action at a time. Used
Annex.Concurrent to deal with that.
P2P.Annex is incomplete as of yet.
2016-12-02 13:52:43 -04:00
Joey Hess
3dce6a080e
cleanups
2016-12-01 00:42:01 -04:00
Joey Hess
e714e0f67a
actually check p2p authtokens for tor connections
...
This commit was sponsored by Ethan Aubin.
2016-11-30 16:46:02 -04:00
Joey Hess
2ad3420c19
fix
2016-11-29 15:43:34 -04:00
Joey Hess
3ed8895a09
fix build
2016-11-24 16:36:16 -04:00
Joey Hess
e053f31816
avoid serving more than 10 tor connections at a time
...
Another 10 clients can be accepted and waiting their turn. After that,
start dropping connections.
This is to avoid DOS attacks..
2016-11-21 22:03:29 -04:00
Joey Hess
2da338bb8d
detect EOF on socket and cleanly shutdown the service process
2016-11-21 21:45:56 -04:00
Joey Hess
483dbcdbef
stop cleanly when there's a IO error accessing the Handle
...
All other exceptions are let through, but IO errors accessing the handle
are to be expected, so quietly ignore.
2016-11-21 21:32:51 -04:00
Joey Hess
070fb9e624
Added git-remote-tor-annex, which allows git pull and push to the tor hidden service.
...
Almost working, but there's a bug in the relaying.
Also, made tor hidden service setup pick a random port, to make it harder
to port scan.
This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
2016-11-21 17:27:38 -04:00
Joey Hess
9cf9ee73f5
improve p2p protocol implementation
...
Tested it in ghci a little now.
2016-11-20 16:42:18 -04:00
Joey Hess
74691ddf0e
remotedaemon: serve tor hidden service
2016-11-20 15:48:12 -04:00