having trouble with tor
register@a6f7d56c3b027a22fa51274e4900965ea104a6a1 authored 5 years ago
admin committed 5 years ago
0 | I am having trouble running github-backup under tor. A normal run works like this: | |
1 | ||
2 | $ github-backup --no-forks anarcat | |
3 | New repository: alabaster | |
4 | Clonage dans 'alabaster'... | |
5 | remote: Enumerating objects: 13, done. | |
6 | remote: Counting objects: 100% (13/13), done. | |
7 | remote: Compressing objects: 100% (11/11), done. | |
8 | remote: Total 1572 (delta 2), reused 11 (delta 2), pack-reused 1559 | |
9 | Réception d'objets: 100% (1572/1572), 508.50 KiB | 2.12 MiB/s, fait. | |
10 | Résolution des deltas: 100% (929/929), fait. | |
11 | [...] | |
12 | ||
13 | But running under tor (with [torsocks](https://github.com/dgoulet/torsocks)) hangs forever: | |
14 | ||
15 | $ torsocks github-backup --no-forks anarcat | |
16 | [blank, hangs forever] | |
17 | ||
18 | `strace` shows the process is looping over this: | |
19 | ||
20 | recvfrom(3, "", 2, 0, NULL, NULL) = 0 | |
21 | select(4, [3], NULL, NULL, NULL) = 1 (in [3]) | |
22 | ||
23 | file descriptor `3` is this, according to lsof: | |
24 | ||
25 | github-ba 18134 anarcat 3u IPv4 162905 0t0 TCP localhost:35828->localhost:9050 (CLOSE_WAIT) | |
26 | ||
27 | ... that's the local SOCKS connexion over to the tor daemon that | |
28 | `torsocks` reroutes the traffic to, with `LD_PRELOAD`, which I suspect | |
29 | is playing badly with the Haskell stack behind `github-backup`. | |
30 | ||
31 | So I understand this might be a compatibility issue - maybe the best | |
32 | would be to add SOCKS proxy support to github-backup? Not sure how | |
33 | best to solve this... --[[anarcat]] |