-
Notifications
You must be signed in to change notification settings - Fork 302
81 lines (80 loc) · 2.34 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Build and test
on: [ push ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.22' # The Go version to download (if necessary) and use.
- run: go test -race -coverprofile coverage.txt -coverpkg ./... -covermode atomic ./...
- uses: codecov/codecov-action@v1
with:
file: coverage.txt
compat-test:
runs-on: ubuntu-latest
services:
cloak-server:
image: cbeuw/cloak:latest
options: build/ck-server -c config/ckserver.json --verbosity debug
volumes:
- config:config
ports:
- 80:80
- 443:443
iperf-server:
image: ajoergensen/iperf3:latest
options: --server
ports:
- 5201:5201
steps:
- name: Create configs
run: |
mkdir config
cat << EOF > config/ckclient.json
{
"Transport": "direct",
"ProxyMethod": "ssh",
"EncryptionMethod": "chacha20-poly1305",
"UID": "Q4GAXHVgnDLXsdTpw6bmoQ==",
"PublicKey": "4dae/bF43FKGq+QbCc5P/E/MPM5qQeGIArjmJEHiZxc=",
"ServerName": "cloudflare.com",
"BrowserSig": "firefox",
"NumConn": 4
}
EOF
cat << EOF > config/ckserver.json
{
"ProxyBook": {
"iperf": [
"tcp",
"iperf-server:5201"
]
},
"BindAddr": [
":443",
":80"
],
"BypassUID": [
"Q4GAXHVgnDLXsdTpw6bmoQ=="
],
"RedirAddr": "cloudflare.com",
"PrivateKey": "AAaskZJRPIAbiuaRLHsvZPvE6gzOeSjg+ZRg1ENau0Y="
}
EOF
- name: Restart Cloak server
uses: docker://docker
with:
args: docker restart cloak-server
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.22'
- run: |
make client
build/ck-client -c config/ckclient.json -s cloak-server --verbosity debug &
iperf3 --client 127.0.0.1 -p 1080