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
refactor: move outline-ss-server to cmd/ and hide code (#136)
- Moves the binary to the standard `cmd` directory, and paves the way for having more binaries.
- Hides internal code to prevent external dependencies.
@@ -22,29 +25,29 @@ The Outline Shadowsocks service allows for:
22
25
23
26
Fetch dependencies for this demo:
24
27
```
25
-
GO111MODULE=off go get github.com/shadowsocks/go-shadowsocks2 github.com/prometheus/prometheus/cmd/...
28
+
GO111MODULE=off go get github.com/prometheus/prometheus/cmd/...
26
29
```
27
-
If that doesn't work, download the [prometheus](https://prometheus.io/download/)or [go-shadowsocks2](https://github.com/shadowsocks/go-shadowsocks2/releases) binaries directly.
30
+
If that doesn't work, download the [prometheus](https://prometheus.io/download/)binary directly.
28
31
29
32
30
33
### Run the server
31
34
On Terminal 1, from the repository directory, build and start the SS server:
32
35
```
33
-
go run . -config config_example.yml -metrics localhost:9091 --replay_history=10000
36
+
go run ./cmd/outline-ss-server -config cmd/outline-ss-server/config_example.yml -metrics localhost:9091 --replay_history=10000
34
37
```
35
38
In production, you may want to specify `-ip_country_db` to get per-country metrics. See [how the Outline Server calls outline-ss-server](https://github.com/Jigsaw-Code/outline-server/blob/master/src/shadowbox/server/outline_shadowsocks_server.ts).
36
39
37
40
38
41
### Run the Prometheus scraper for metrics collection
39
42
On Terminal 2, start prometheus scraper for metrics collection:
go run github.com/shadowsocks/go-shadowsocks2 -c ss://chacha20-ietf-poly1305:Secret0@:9000 -tcptun ":8000=localhost:5201" -udptun ":8000=localhost:5201" -verbose
0 commit comments