tidy readme
Kim committed
Oct 21, 2025 at 15:09 UTC
148a1ca4c763ad3e699e795d962e047eb41926a4
1 file changed
+9
-46
README.md
+9
-46
@@ -31,48 +31,26 @@ without depending on centralized reverse-proxy services.
31
32
### 1️⃣ Run the Server (Docker Compose)
33
34
-The server accepts incoming TCP connections and forwards them over libp2p to available clients.
35
-
36
-Option A — using Makefile:
37
-```bash
38
-make server-up # build + start
39
-make server-down # stop
40
-```
41
-
42
-Option B — raw docker compose:
34
```bash
35
docker compose up --build -d
45
-docker compose logs -f relayserver
36
```
37
38
Published ports:
49
-- Unified Admin UI + HTTP proxy: `8080`
39
+- Admin/UI + HTTP proxy: `8080`
40
- libp2p TCP/QUIC: `4001/tcp`, `4001/udp`
41
52
-To add bootstraps, edit `docker-compose.yml` and append repeated `--bootstrap` flags under `relayserver.command`.
42
+### 2️⃣ Run the Example Client (Makefile)
43
54
-### 2️⃣ Run the Example Client (Local Go)
55
-
56
-The example client runs a local HTTP backend and advertises it via libp2p.
57
-
58
-Option A — using Makefile (recommended):
59
-```bash
60
-make client-run \
61
- BACKEND_HTTP=:8081 \
62
- SERVER_URL=http://localhost:8080 \
63
- BOOTSTRAPS="/dnsaddr/your.bootstrap/p2p/12D3Koo..."
64
-```
44
+The example client runs a tiny local HTTP backend and advertises it over libp2p.
45
66
-Option B — go run directly:
46
```bash
68
-go run ./cmd/example_client \
69
- --backend-http :8081 \
70
- --server-url http://localhost:8080 \
71
- --bootstrap /dnsaddr/your.bootstrap/p2p/12D3Koo... \
72
-
47
+make client-run
48
+# Optional (override on demand):
49
+# make client-run BACKEND_HTTP=:8081 SERVER_URL=http://localhost:8080 \
50
+# BOOTSTRAPS="/dnsaddr/your.bootstrap/p2p/12D3Koo..."
51
```
52
75
-The client exposes a tiny local HTTP server at `--backend-http` and tunnels traffic from the server to this address via libp2p streams.
53
+The client exposes a tiny local HTTP server and tunnels traffic to it via libp2p streams.
54
55
### 3️⃣ Embed the Client SDK in Your App
56
@@ -115,19 +93,4 @@ Server flags (see `docker-compose.yml`):
93
Example client flags (see `make client-run`):
94
- `--server-url` Admin base URL to fetch `/health` (default `http://localhost:8080`)
95
- `--bootstrap` Repeatable multiaddr with `/p2p/`
118
-- `--backend-http` Local backend HTTP listen address (default `:8081`)
119
-
120
-## Logging
121
-
122
-This project uses `zerolog` for structured logging. Binaries initialize a human-friendly console logger by default.
123
-
124
-## Development
125
-
126
-Useful commands:
127
-```bash
128
-make server-up # build and start the server via docker compose
129
-make server-down # stop the compose stack
130
-
131
-make client-run # run the example client locally
132
-make client-build # build the example client to ./bin/relaydns-client
133
-```
96
+- `--backend-http` Local backend HTTP listen address (default `:8081`)
\ No newline at end of file