Skip to content

Commit de41d3e

Browse files
authored
Clean up old code (#172)
1 parent e7d30a0 commit de41d3e

23 files changed

+147
-1607
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@
2424

2525
# Prometheus
2626
/data/
27+
28+
# Go task
29+
/.task/

Makefile

-25
This file was deleted.

README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ You can mix and match the libev and go servers and clients.
148148

149149
To run the tests and benchmarks, call:
150150
```
151-
make test
151+
go run github.com/go-task/task/v3/cmd/task test
152152
```
153153

154154
You can benchmark the cipher finding code with
@@ -165,11 +165,12 @@ We use [GoReleaser](https://goreleaser.com/) to build and upload binaries to our
165165
Summary:
166166
- Test the build locally:
167167
```
168-
make release-local
168+
go run github.com/go-task/task/v3/cmd/task release-local
169169
```
170170
- Export an environment variable named `GITHUB_TOKEN` with a temporary repo-scoped GitHub token ([create one here](https://github.com/settings/tokens/new)):
171171
```bash
172-
export GITHUB_TOKEN=yournewtoken
172+
read -s -p "Type your Github token:" GITHUB_TOKEN
173+
export GITHUB_TOKEN
173174
```
174175
- Create a new tag and push it to GitHub e.g.:
175176
```bash
@@ -178,7 +179,7 @@ Summary:
178179
```
179180
- Build and upload:
180181
```bash
181-
make release
182+
go run github.com/go-task/task/v3/cmd/task release
182183
```
183184
- Go to https://github.com/Jigsaw-Code/outline-ss-server/releases, review and publish the release.
184185

Taskfile.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
version: '3'
2+
3+
run: when_changed
4+
5+
vars:
6+
OUT_DIR: "{{.USER_WORKING_DIR}}/dist"
7+
8+
tasks:
9+
release:
10+
desc: "Release"
11+
deps: [clean]
12+
cmds:
13+
- go run github.com/goreleaser/goreleaser
14+
15+
16+
release-local:
17+
desc: "Build a release binary"
18+
cmds:
19+
- go run github.com/goreleaser/goreleaser --clean --snapshot
20+
21+
test:
22+
desc: "Runs tests"
23+
deps: [mmdb]
24+
cmds:
25+
- go test -v -race -benchmem -bench=. ./... -benchtime=100ms
26+
27+
mmdb:
28+
cmds:
29+
- git submodule update --init --depth=1
30+
sources:
31+
- "{{.ROOT_DIR}}/gitmodules"
32+
generates:
33+
- "{{.ROOT_DIR}}/third_party/maxmind/test-data/GeoIP2-Country-Test.mmdb"
34+
35+
clean:
36+
desc: "Cleans output directory"
37+
cmds:
38+
- rm -rf {{.OUT_DIR}}
39+
- git submodule deinit --all
40+
- go clean

client/client.go

-127
This file was deleted.

client/salt.go

-24
This file was deleted.

go.mod

+20-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
module github.com/Jigsaw-Code/outline-ss-server
22

33
require (
4-
github.com/Jigsaw-Code/outline-sdk v0.0.2
4+
github.com/Jigsaw-Code/outline-sdk v0.0.14
5+
github.com/go-task/task/v3 v3.34.1
56
github.com/goreleaser/goreleaser v1.18.2
67
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7
78
github.com/oschwald/geoip2-golang v1.8.0
89
github.com/prometheus/client_golang v1.15.0
910
github.com/shadowsocks/go-shadowsocks2 v0.1.5
1011
github.com/stretchr/testify v1.8.4
1112
golang.org/x/crypto v0.17.0
12-
golang.org/x/term v0.15.0
13+
golang.org/x/term v0.16.0
1314
gopkg.in/yaml.v2 v2.4.0
1415
)
1516

@@ -110,6 +111,7 @@ require (
110111
github.com/elliotchance/orderedmap/v2 v2.2.0 // indirect
111112
github.com/emirpasic/gods v1.18.1 // indirect
112113
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
114+
github.com/fatih/color v1.16.0 // indirect
113115
github.com/fsnotify/fsnotify v1.6.0 // indirect
114116
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
115117
github.com/go-git/go-billy/v5 v5.5.0 // indirect
@@ -124,6 +126,7 @@ require (
124126
github.com/go-openapi/strfmt v0.21.7 // indirect
125127
github.com/go-openapi/swag v0.22.3 // indirect
126128
github.com/go-openapi/validate v0.22.1 // indirect
129+
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
127130
github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible // indirect
128131
github.com/gobwas/glob v0.2.3 // indirect
129132
github.com/gogo/protobuf v1.3.2 // indirect
@@ -158,21 +161,26 @@ require (
158161
github.com/invopop/jsonschema v0.7.0 // indirect
159162
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
160163
github.com/jmespath/go-jmespath v0.4.0 // indirect
164+
github.com/joho/godotenv v1.5.1 // indirect
161165
github.com/josharian/intern v1.0.0 // indirect
162166
github.com/kevinburke/ssh_config v1.2.0 // indirect
163167
github.com/klauspost/compress v1.16.3 // indirect
168+
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
164169
github.com/klauspost/pgzip v1.2.5 // indirect
165170
github.com/kylelemons/godebug v1.1.0 // indirect
166171
github.com/letsencrypt/boulder v0.0.0-20221109233200-85aa52084eaf // indirect
167172
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
168173
github.com/magiconair/properties v1.8.7 // indirect
169174
github.com/mailru/easyjson v0.7.7 // indirect
170-
github.com/mattn/go-isatty v0.0.17 // indirect
175+
github.com/mattn/go-colorable v0.1.13 // indirect
176+
github.com/mattn/go-isatty v0.0.20 // indirect
171177
github.com/mattn/go-mastodon v0.0.6 // indirect
172178
github.com/mattn/go-runewidth v0.0.14 // indirect
179+
github.com/mattn/go-zglob v0.0.4 // indirect
173180
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
174181
github.com/mitchellh/copystructure v1.2.0 // indirect
175182
github.com/mitchellh/go-homedir v1.1.0 // indirect
183+
github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect
176184
github.com/mitchellh/mapstructure v1.5.0 // indirect
177185
github.com/mitchellh/reflectwalk v1.0.2 // indirect
178186
github.com/muesli/mango v0.1.0 // indirect
@@ -194,9 +202,10 @@ require (
194202
github.com/prometheus/client_model v0.3.0 // indirect
195203
github.com/prometheus/common v0.42.0 // indirect
196204
github.com/prometheus/procfs v0.9.0 // indirect
197-
github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 // indirect
205+
github.com/radovskyb/watcher v1.0.7 // indirect
198206
github.com/rivo/uniseg v0.4.2 // indirect
199207
github.com/russross/blackfriday/v2 v2.1.0 // indirect
208+
github.com/sajari/fuzzy v1.0.0 // indirect
200209
github.com/sasha-s/go-csync v0.0.0-20210812194225-61421b77c44b // indirect
201210
github.com/sergi/go-diff v1.2.0 // indirect
202211
github.com/sigstore/cosign/v2 v2.0.0 // indirect
@@ -221,20 +230,21 @@ require (
221230
github.com/withfig/autocomplete-tools/integrations/cobra v1.2.1 // indirect
222231
github.com/xanzy/go-gitlab v0.83.0 // indirect
223232
github.com/xanzy/ssh-agent v0.3.3 // indirect
233+
github.com/zeebo/xxh3 v1.0.2 // indirect
224234
gitlab.com/digitalxero/go-conventional-commit v1.0.7 // indirect
225235
go.mongodb.org/mongo-driver v1.11.3 // indirect
226236
go.opencensus.io v0.24.0 // indirect
227237
go.uber.org/automaxprocs v1.5.2 // indirect
228238
gocloud.dev v0.29.0 // indirect
229-
golang.org/x/exp v0.0.0-20230124195608-d38c7dcee874 // indirect
230-
golang.org/x/mod v0.12.0 // indirect
239+
golang.org/x/exp v0.0.0-20240110193028-0dcbfd608b1e // indirect
240+
golang.org/x/mod v0.14.0 // indirect
231241
golang.org/x/net v0.19.0 // indirect
232242
golang.org/x/oauth2 v0.7.0 // indirect
233-
golang.org/x/sync v0.3.0 // indirect
234-
golang.org/x/sys v0.15.0 // indirect
243+
golang.org/x/sync v0.6.0 // indirect
244+
golang.org/x/sys v0.16.0 // indirect
235245
golang.org/x/text v0.14.0 // indirect
236246
golang.org/x/time v0.3.0 // indirect
237-
golang.org/x/tools v0.13.0 // indirect
247+
golang.org/x/tools v0.16.0 // indirect
238248
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
239249
google.golang.org/api v0.119.0 // indirect
240250
google.golang.org/appengine v1.6.7 // indirect
@@ -247,6 +257,7 @@ require (
247257
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
248258
gopkg.in/warnings.v0 v0.1.2 // indirect
249259
gopkg.in/yaml.v3 v3.0.1 // indirect
260+
mvdan.cc/sh/v3 v3.7.0 // indirect
250261
sigs.k8s.io/kind v0.17.0 // indirect
251262
sigs.k8s.io/yaml v1.3.0 // indirect
252263
)

0 commit comments

Comments
 (0)