| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
| |
and start serving it. This makes the webapp wormhole tor pairing work 100%!
This commit was sponsored by Andrea Rota.
|
| |
|
|
|
|
|
|
| |
This reverts commit 6c089cff615bc44ca94cc4ca77dc69f281dd2ab8.
Commit contained incomplete work.
|
| |
|
|
|
|
|
|
| |
To make it easier to manage/delete them etc.
Backwards compatablity is preserved for existing tor configs.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
weasel explained that apparmor limits on what files tor can read do not
apply to sockets (because they're not files). And apparently the
problems I was seeing with hidden services not being accessible had to
do with onion address propigation and not the location of the socket
file.
remotedaemon looks up the HiddenServicePort in torrc, so if it was
previously configured with the socket in /etc, that will still work.
This commit was sponsored by Denis Dzyubenko on Patreon.
|
|
|
|
|
|
|
| |
Old stm lacks isFullTMQueue.
To avoid needing to update stm on the Android autobuilder, I switched to
a TBMQueue. It never needs to be closed, but the overhead is minimal.
|
| |
|
|
|
|
| |
Avoid crashing when built w/o inotify..
|
|
|
|
|
|
|
|
|
|
|
| |
10 seemed too low because more than 10 friends could be linked to a repo
over tor, and if all were running the remotedaemon, which makes a
persistent connection for change notification, then the 11th friend
would not be able to access that repo.
100 might be too low, but it's a much larger group of people. And at
that size group, it probably makes sense to structure the network so
that 100 peers are not all trying to access one central node.
|
| |
|
|
|
|
|
|
| |
This is more efficient. Note that the peer will get CHANGED messages for
all refs changed since the connection opened, even if those changes
happened before it sent NOTIFYCHANGE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added to change notification to P2P protocol.
Switched to a TBChan so that a single long-running thread can be
started, and serve perhaps intermittent requests for change
notifications, without buffering all changes in memory.
The P2P runner currently starts up a new thread each times it waits
for a change, but that should allow later reusing a thread. Although
each connection from a peer will still need a new watcher thread to run.
The dependency on stm-chans is more or less free; some stuff in yesod
uses it, so it was already indirectly pulled in when building with the
webapp.
This commit was sponsored by Francois Marier on Patreon.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The attacker could just send a very lot of data, with no \n and it would
all be buffered in memory until the kernel killed git-annex or perhaps OOM
killed some other more valuable process.
This is a low impact security hole, only affecting communication between
local git-annex and git-annex-shell on the remote system. (With either
able to be the attacker). Only those with the right ssh key can do it. And,
there are probably lots of ways to construct git repositories that make git
use a lot of memory in various ways, which would have similar impact as
this attack.
The fix in P2P/IO.hs would have been higher impact, if it had made it to a
released version, since it would have allowed DOSing the tor hidden
service without needing to authenticate.
(The LockContent and NotifyChanges instances may not be really
exploitable; since the line is read and ignored, it probably gets read
lazily and does not end up staying buffered in memory.)
|
| |
|
|
|
|
|
|
| |
It's a daemon or is communictaing with the assistant over stdio, so
should not display checksum messages etc while serving the P2P protocol
etc.
|
| |
|
| |
|
|
|
|
|
|
| |
So we get some useful error messages when things fail.
This commit was sponsored by Peter Hogg on Patreon.
|
| |
|
|
|
|
| |
This will allow updating transfer logs with the uuid.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
This commit was sponsored by Ethan Aubin.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Another 10 clients can be accepted and waiting their turn. After that,
start dropping connections.
This is to avoid DOS attacks..
|
| |
|
|
|
|
|
| |
All other exceptions are let through, but IO errors accessing the handle
are to be expected, so quietly ignore.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Tested it in ghci a little now.
|
| |
|
|
|
|
|
|
| |
enable old behavior.
Groundwork for tor hidden services, which the remotedaemon will serve.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For use with tor hidden services, and perhaps other transports later.
Based on Utility.SimpleProtocol, it's a line-based protocol,
interspersed with transfers of bytestrings of a specified size.
Implementation of the local and remote sides of the protocol is done
using a free monad. This lets monadic code be included here, without
tying it to any particular way to get bytes peer-to-peer.
This adds a dependency on the haskell package "free", although that
was probably pulled in transitively from other dependencies already.
This commit was sponsored by Jeff Goeke-Smith on Patreon.
|
| |
|
|
|
|
| |
which was never tested and didn't quite work before.
|
| |
|
| |
|
|
|
|
| |
which was never tested and didn't quite work before.
|
|
|
|
|
|
|
|
|
| |
* sync: Use the ssh-options git config when doing git pull and push.
* remotedaemon: Use the ssh-options git config.
Note that the rename env var means that if a new git-annex calls an old one
for git-annex ssh, or a new calls an old, nothing much will go wrong;
just ssh caching won't happen.
|
| |
|
|
|
|
|
|
|
|
| |
after two LOSTNET messages were received in a row
Perhaps due to two different network interfaces being brought down.
Since there is no reliable way to drain a Chan, I switched to STM TChan.
|
|
|
|
|
|
|
|
|
|
|
| |
Found these with:
git grep "^ " $(find -type f -name \*.hs) |grep -v ': where'
Unfortunately there is some inline hamlet that cannot use tabs for
indentation.
Also, Assistant/WebApp/Bootstrap3.hs is a copy of a module and so I'm
leaving it as-is.
|
|
|
|
|
|
|
|
|
| |
This fixes all instances of " \t" in the code base. Most common case
seems to be after a "where" line; probably vim copied the two space layout
of that line.
Done as a background task while listening to episode 2 of the Type Theory
podcast.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removed old extensible-exceptions, only needed for very old ghc.
Made webdav use Utility.Exception, to work after some changes in DAV's
exception handling.
Removed Annex.Exception. Mostly this was trivial, but note that
tryAnnex is replaced with tryNonAsync and catchAnnex replaced with
catchNonAsync. In theory that could be a behavior change, since the former
caught all exceptions, and the latter don't catch async exceptions.
However, in practice, nothing in the Annex monad uses async exceptions.
Grepping for throwTo and killThread only find stuff in the assistant,
which does not seem related.
Command.Add.undo is changed to accept a SomeException, and things
that use it for rollback now catch non-async exceptions, rather than
only IOExceptions.
|
|
|
|
| |
update code to avoid cwd and env redefinition warnings
|
| |
|
|
|
|
|
| |
This doesn't work yet, because RELOAD is buggy and does not notice the new
remote.
|
| |
|