Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add docker test for current protocol(vmess, ss, trojan) #324

Merged
merged 25 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b395058
feat: add docker test for current protocol(vmess, ss, trojan)
VendettaReborn Mar 17, 2024
051b460
fix opt.host in http2 config (#323)
VendettaReborn Mar 17, 2024
6f7d131
Bump clap from 4.5.2 to 4.5.3 (#330)
dependabot[bot] Mar 18, 2024
1053cad
Bump h2 from 0.4.2 to 0.4.3 (#328)
dependabot[bot] Mar 18, 2024
35dcef5
Bump async-trait from 0.1.77 to 0.1.78 (#329)
dependabot[bot] Mar 18, 2024
f36331c
Bump serde_yaml from 0.9.32 to 0.9.33 (#326)
dependabot[bot] Mar 18, 2024
0e71cba
Bump brotli from 3.4.0 to 3.5.0 (#327)
dependabot[bot] Mar 18, 2024
931d0c9
Bump async-recursion from 1.0.5 to 1.1.0 (#325)
dependabot[bot] Mar 18, 2024
3e60e5a
optimize docker test structure; use serial test to make sure the corr…
VendettaReborn Mar 18, 2024
8af53f1
move println to tracing
VendettaReborn Mar 18, 2024
90a5b6e
rename; add doc
VendettaReborn Mar 18, 2024
4a692b9
simplify DockerTestRunner type signature
VendettaReborn Mar 19, 2024
675d1f8
simplify DockerTestRunner, remove useless exec function
VendettaReborn Mar 19, 2024
b6a4a6d
fix format error
VendettaReborn Mar 19, 2024
4255805
exclude macos from the docker test's supported archs
VendettaReborn Mar 19, 2024
7911d72
use build flag to gate tests
ibigbug Mar 21, 2024
c91162d
fix ci error; simplify the docker test code, add timeoutlogic
VendettaReborn Mar 22, 2024
958940b
Bump uuid from 1.7.0 to 1.8.0 (#331)
dependabot[bot] Mar 19, 2024
6ff61be
Update README.md
ibigbug Mar 19, 2024
e03ba8c
gix style warnings
VendettaReborn Mar 23, 2024
cdd1875
error propgating
ibigbug Mar 26, 2024
d5ef72f
Merge branch 'master' into feat/docker_test
ibigbug Mar 26, 2024
39d7b4c
fix env variable in github action
VendettaReborn Mar 28, 2024
ebdb619
fix ci error
VendettaReborn Mar 28, 2024
5d18edb
Update ci.yml
ibigbug Mar 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions clash/tests/data/config/example.org-key.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDQ+c++LkDTdaw5
5spCu9MWMcvVdrYBZZ5qZy7DskphSUSQp25cIu34GJXVPNxtbWx1CQCmdLlwqXvo
PfUt5/pz9qsfhdAbzFduZQgGd7GTQOTJBDrAhm2+iVsQyGHHhF68muN+SgT+AtRE
sJyZoHNYtjjWEIHQ++FHEDqwUVnj6Ut99LHlyfCjOZ5+WyBiKCjyMNots/gDep7R
i4X2kMTqNMIIqPUcAaP5EQk41bJbFhKe915qN9b1dRISKFKmiWeOsxgTB/O/EaL5
LsBYwZ/BiIMDk30aZvzRJeloasIR3z4hrKQqBfB0lfeIdiPpJIs5rXJQEiWH89ge
gplsLbfrAgMBAAECggEBAKpMGaZzDPMF/v8Ee6lcZM2+cMyZPALxa+JsCakCvyh+
y7hSKVY+RM0cQ+YM/djTBkJtvrDniEMuasI803PAitI7nwJGSuyMXmehP6P9oKFO
jeLeZn6ETiSqzKJlmYE89vMeCevdqCnT5mW/wy5Smg0eGj0gIJpM2S3PJPSQpv9Z
ots0JXkwooJcpGWzlwPkjSouY2gDbE4Coi+jmYLNjA1k5RbggcutnUCZZkJ6yMNv
H52VjnkffpAFHRouK/YgF+5nbMyyw5YTLOyTWBq7qfBMsXynkWLU73GC/xDZa3yG
o/Ph2knXCjgLmCRessTOObdOXedjnGWIjiqF8fVboDECgYEA6x5CteYiwthDBULZ
CG5nE9VKkRHJYdArm+VjmGbzK51tKli112avmU4r3ol907+mEa4tWLkPqdZrrL49
aHltuHizZJixJcw0rcI302ot/Ov0gkF9V55gnAQS/Kemvx9FHWm5NHdYvbObzj33
bYRLJBtJWzYg9M8Bw9ZrUnegc/MCgYEA44kq5OSYCbyu3eaX8XHTtFhuQHNFjwl7
Xk/Oel6PVZzmt+oOlDHnOfGSB/KpR3YXxFRngiiPZzbrOwFyPGe7HIfg03HAXiJh
ivEfrPHbQqQUI/4b44GpDy6bhNtz777ivFGYEt21vpwd89rFiye+RkqF8eL/evxO
pUayDZYvwikCgYEA07wFoZ/lkAiHmpZPsxsRcrfzFd+pto9splEWtumHdbCo3ajT
4W5VFr9iHF8/VFDT8jokFjFaXL1/bCpKTOqFl8oC68XiSkKy8gPkmFyXm5y2LhNi
GGTFZdr5alRkgttbN5i9M/WCkhvMZRhC2Xp43MRB9IUzeqNtWHqhXbvjYGcCgYEA
vTMOztviLJ6PjYa0K5lp31l0+/SeD21j/y0/VPOSHi9kjeN7EfFZAw6DTkaSShDB
fIhutYVCkSHSgfMW6XGb3gKCiW/Z9KyEDYOowicuGgDTmoYu7IOhbzVjLhtJET7Z
zJvQZ0eiW4f3RBFTF/4JMuu+6z7FD6ADSV06qx+KQNkCgYBw26iQxmT5e/4kVv8X
DzBJ1HuliKBnnzZA1YRjB4H8F6Yrq+9qur1Lurez4YlbkGV8yPFt+Iu82ViUWL28
9T7Jgp3TOpf8qOqsWFv8HldpEZbE0Tcib4x6s+zOg/aw0ac/xOPY1sCVFB81VODP
XCar+uxMBXI1zbXqd9QdEwy4Ig==
-----END PRIVATE KEY-----
25 changes: 25 additions & 0 deletions clash/tests/data/config/example.org.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
-----BEGIN CERTI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DrgolZ8Ce5H4RTJDAabHU9XhEzfGSVtzRSFsz+szu1
Y30IV+08DxxqMmNPspYdpAET2Lwyk2WhnARGiGw11CRkQCEkVEe6d702vS9UGBUz
Du6lmCYCm0SbFrZ0CGgmHSHoTcCtf3EjVam7dPg3yWiPbWjvhXxgip6hz9sCqkhG
WA5f+fPgSZ1I9U4i+uYnqjfrzwgC08RwUYordm15F6gPvXw+KVwDO8yUYQoEH0b6
AFJtbzoAXDysvBC6kWYFFOr62EaisaEkELTS/NrPD9ux1eKbxcxHCwEtVjgC0CL6
gAxEAQ+9maJMbrAFhsOBbGGFC+mMCGg4eEyx6+iMB0oQe0W7QFeRUAFi7Ptc/ocS
tZ9lbrfX1/wrcTTWIYWE+xH6oeb4fhs29kxjHcf2l+tQzmpl0aP3Z/bMW4BSB+w=
-----END CERTIFICATE-----
2 changes: 1 addition & 1 deletion clash/tests/data/config/ss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ proxies:
udp: true

rules:
- MATCH, ss
- MATCH, ss-01
...
40 changes: 40 additions & 0 deletions clash/tests/data/config/trojan-grpc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"inbounds": [
{
"port": 10002,
"listen": "0.0.0.0",
"protocol": "trojan",
"settings": {
"clients": [
{
"password": "example",
"email": "[email protected]"
}
]
},
"streamSettings": {
"network": "grpc",
"security": "tls",
"tlsSettings": {
"certificates": [
{
"certificateFile": "/etc/ssl/v2ray/fullchain.pem",
"keyFile": "/etc/ssl/v2ray/privkey.pem"
}
]
},
"grpcSettings": {
"serviceName": "example"
}
}
}
],
"outbounds": [
{
"protocol": "freedom"
}
],
"log": {
"loglevel": "debug"
}
}
20 changes: 20 additions & 0 deletions clash/tests/data/config/trojan-ws.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"run_type": "server",
"local_addr": "0.0.0.0",
"local_port": 10002,
"disable_http_check": true,
"password": [
"example"
],
"websocket": {
"enabled": true,
"path": "/",
"host": "example.org"
},
"ssl": {
"verify": true,
"cert": "/fullchain.pem",
"key": "/privkey.pem",
"sni": "example.org"
}
}
39 changes: 39 additions & 0 deletions clash/tests/data/config/vmess-grpc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"inbounds": [
{
"port": 10002,
"listen": "0.0.0.0",
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "b831381d-6324-4d53-ad4f-8cda48b30811"
}
]
},
"streamSettings": {
"network": "grpc",
"security": "tls",
"tlsSettings": {
"certificates": [
{
"certificateFile": "/etc/ssl/v2ray/fullchain.pem",
"keyFile": "/etc/ssl/v2ray/privkey.pem"
}
]
},
"grpcSettings": {
"serviceName": "example!"
}
}
}
],
"outbounds": [
{
"protocol": "freedom"
}
],
"log": {
"loglevel": "debug"
}
}
42 changes: 42 additions & 0 deletions clash/tests/data/config/vmess-http2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"inbounds": [
{
"port": 10002,
"listen": "0.0.0.0",
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "b831381d-6324-4d53-ad4f-8cda48b30811"
}
]
},
"streamSettings": {
"network": "http",
"security": "tls",
"tlsSettings": {
"certificates": [
{
"certificateFile": "/etc/ssl/v2ray/fullchain.pem",
"keyFile": "/etc/ssl/v2ray/privkey.pem"
}
]
},
"httpSettings": {
"host": [
"example.org"
],
"path": "/test"
}
}
}
],
"outbounds": [
{
"protocol": "freedom"
}
],
"log": {
"loglevel": "debug"
}
}
25 changes: 25 additions & 0 deletions clash/tests/data/config/vmess-ws.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"inbounds": [
{
"port": 10002,
"listen": "0.0.0.0",
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "b831381d-6324-4d53-ad4f-8cda48b30811"
}
]
},
"streamSettings": {
"network": "ws",
"security": "none"
}
}
],
"outbounds": [
{
"protocol": "freedom"
}
]
}
1 change: 1 addition & 0 deletions clash_lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ ctor = "0.2"
mockall = "0.12.1"
tokio-test = "0.4.4"
axum-macros = "0.4.0"
bollard = "0.16"


[target.'cfg(macos)'.dependencies]
Expand Down
Loading
Loading