Skip to content

Commit 7bd3a0e

Browse files
committed
update diag
1 parent 996b644 commit 7bd3a0e

File tree

1 file changed

+33
-10
lines changed

1 file changed

+33
-10
lines changed

README.md

+33-10
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,37 @@
22

33
a simple load balanced torsocks service, a fork of the excellent [Iglesys347/castor](https://github.com/Iglesys347/castor)
44

5-
creates a defined number of backend tor circuits, leveraging haproxy to round-robin requests
5+
creates an infinite number of backend tor circuits, leveraging haproxy to round-robin requests
66

7-
tl;dr - one ingress proxy, infinite exit circuits
7+
multisocks will expose a SOCKS5 proxy on `:8080` and a statistics report on haproxy at `:1337`
88

99
```mermaid
10-
graph TD
11-
A[client] -->|socks5:// *:8080| B(haproxy)
12-
B --> D[tor relay 1]
13-
B --> E[tor relay 2]
14-
B --> F[tor relay 3]
10+
flowchart TB
11+
sclient[proxy client :8080]-->front
12+
stat{{stats :1337}}-->front
13+
front[haproxy]
14+
style sclient fill:#f9f,stroke:#333,stroke-width:2px
15+
style stat fill:#bbf,stroke:#f66,stroke-width:2px,color:#fff,stroke-dasharray: 5 5
16+
subgraph scaler[x scaled instances]
17+
subgraph tor1 [tor]
18+
ctrl[controlport]
19+
sock[socksport]
20+
end
21+
subgraph tor2 [tor]
22+
ctrl2[controlport]
23+
sock2[socksport]
24+
end
25+
subgraph tor3 [tor]
26+
ctrl3[controlport]
27+
sock3[socksport]
28+
end
29+
end
30+
front<-->sock
31+
front-. healthcheck .-> ctrl
32+
front<-->sock2
33+
front-. healthcheck .-> ctrl2
34+
front<-->sock3
35+
front-. healthcheck .-> ctrl3
1536
```
1637

1738
---
@@ -20,23 +41,25 @@ graph TD
2041

2142
set the number of tor instances to be created by altering `SOCKS` within `.env`
2243

23-
alternativley see `services.tor.deploy.replicas` within `docker-compose.yml`
44+
_reference `services.tor.deploy.replicas` within `docker-compose.yml`_
2445
## runtime
2546

2647
```shell
2748
git clone https://github.com/joshhighet/multisocks
2849
docker compose --file multisocks/docker-compose.yml up --detach
2950
```
3051

52+
after bringing up the containerset - you will need to wait for tor to build circuits before the proxy will accept connections
53+
54+
to view the status of haproxy, navigate to `your-multisocks-host:1337` in a browser
55+
3156
## debugging
3257

3358
```shell
3459
cd multisocks
3560
docker compose logs --timestamps --follow
3661
```
3762

38-
_for further tracing, modify `Log` within `tor/torrc` or enable the `ControlPort` and leverage [nyx](https://nyx.torproject.org)_
39-
4063
## testing
4164

4265
```shell

0 commit comments

Comments
 (0)