You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+82-1Lines changed: 82 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,4 +7,85 @@ This is a small bot to have fun with several things:
7
7
This small thing starts and tries to get service descriptors for sites mentioned in `sites.txt`. If hidden service descriptor received - the site is marked as up. Else - down. That's simple.
8
8
9
9
## Where is the bot
10
-
## Setup
10
+
11
+
Follow the bot on mastodon. Staging account is [[email protected]](https://botsin.space/@devmacaca)
12
+
13
+
## Prerequisites
14
+
15
+
There are some prerequisites for set up. You need Tor deamon running to request hidden service descriptors, you will need a mastodon account to post collected statuses and you'd better have Seq to collect logs from application.
16
+
17
+
### Tor daemon
18
+
19
+
Setup tor according to tor manual, configure bridges if connection to tor network fails or is unstable. Tor deamon is communicated through unix domain socket, typically located at `/run/tor/control`. You will also need an auth cookie to execute commands, so you should also be able to read cookie from `/run/tor/control.authcookie`.
20
+
21
+
### Mastodon account
22
+
23
+
Get a bot account on some mastodon instance, where you would like to post your statuses. Do respect instance policies for bots and automated posts.
24
+
Register application and save API token. You'll need it.
25
+
Also, save information on toot length on this instance. It will be used in configuration.
26
+
27
+
### Seq
28
+
29
+
Logging to console is great, but i prefer seq for pet projects. It is small, fast, reliable, painless log collector. The Seq Serilog sink is already built in NTorSpectator, pointing to `http://seq:5341`
30
+
31
+
## Setup
32
+
33
+
The best way to run applications is docker compose. So the sample file looks like this:
34
+
35
+
```yaml
36
+
version: "3"
37
+
38
+
services:
39
+
tor_spectator:
40
+
image: ghcr.io/zetroot/ntorspectator:latest
41
+
platform: linux/arm64
42
+
restart: always
43
+
depends_on:
44
+
seq:
45
+
condition: service_started
46
+
container_name: ntorspectator
47
+
environment:
48
+
- ASPNETCORE_ENVIRONMENT=Production # this is production environment, is not it?
49
+
volumes:
50
+
- "./sites.txt:/app/sites.txt"# mount file with site list into application folder
51
+
- "./appsettings.Production.json:/app/appsettings.Production.json"# mount production config into app folder
52
+
- "/run/tor/control:/run/tor/control"# also mount tor unix-socket
53
+
- "/run/tor/control.authcookie:/run/tor/control.authcookie"# and not forget about auth cookie
54
+
55
+
seq:
56
+
image: datalust/seq:latest
57
+
container_name: seq_torspec
58
+
hostname: seq
59
+
restart: unless-stopped
60
+
volumes:
61
+
- "./seq_data:/data"# persist logs to disk
62
+
ports:
63
+
- "8081:80"
64
+
- "5342:5341"
65
+
environment:
66
+
- ACCEPT_EULA=Y
67
+
```
68
+
69
+
`Sites.txt` is a file with tor onion links, one at a line:
0 commit comments