From 661c417fceae6fd5f6c9f21a32bbacd6ff528c46 Mon Sep 17 00:00:00 2001 From: Dreamacro <8615343+Dreamacro@users.noreply.github.com> Date: Sat, 4 Sep 2021 22:31:08 +0800 Subject: [PATCH] Test: use shadowsocks-rust for ss benchmark --- test/clash_test.go | 11 ++++++----- test/ss_test.go | 10 ++++++---- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/test/clash_test.go b/test/clash_test.go index 366cc260..b3192283 100644 --- a/test/clash_test.go +++ b/test/clash_test.go @@ -27,11 +27,12 @@ import ( ) const ( - ImageShadowsocks = "mritd/shadowsocks:latest" - ImageVmess = "v2fly/v2fly-core:latest" - ImageTrojan = "trojangfw/trojan:latest" - ImageSnell = "icpz/snell-server:latest" - ImageXray = "teddysun/xray:latest" + ImageShadowsocks = "mritd/shadowsocks:latest" + ImageShadowsocksRust = "ghcr.io/shadowsocks/ssserver-rust:latest" + ImageVmess = "v2fly/v2fly-core:latest" + ImageTrojan = "trojangfw/trojan:latest" + ImageSnell = "icpz/snell-server:latest" + ImageXray = "teddysun/xray:latest" ) var ( diff --git a/test/ss_test.go b/test/ss_test.go index 7cba7efd..446bae93 100644 --- a/test/ss_test.go +++ b/test/ss_test.go @@ -12,8 +12,9 @@ import ( func TestClash_Shadowsocks(t *testing.T) { cfg := &container.Config{ - Image: ImageShadowsocks, - Env: []string{"SS_MODULE=ss-server", "SS_CONFIG=-s 0.0.0.0 -u -v -p 10002 -m chacha20-ietf-poly1305 -k FzcLbKs2dY9mhL"}, + Image: ImageShadowsocksRust, + Entrypoint: []string{"ssserver"}, + Cmd: []string{"-s", "0.0.0.0:10002", "-m", "chacha20-ietf-poly1305", "-k", "FzcLbKs2dY9mhL", "-U"}, ExposedPorts: defaultExposedPorts, } hostCfg := &container.HostConfig{ @@ -173,8 +174,9 @@ func TestClash_ShadowsocksV2RayPlugin(t *testing.T) { func Benchmark_Shadowsocks(b *testing.B) { cfg := &container.Config{ - Image: ImageShadowsocks, - Env: []string{"SS_MODULE=ss-server", "SS_CONFIG=-s 0.0.0.0 -u -v -p 10002 -m aes-256-gcm -k FzcLbKs2dY9mhL"}, + Image: ImageShadowsocksRust, + Entrypoint: []string{"ssserver"}, + Cmd: []string{"-s", "0.0.0.0:10002", "-m", "aes-256-gcm", "-k", "FzcLbKs2dY9mhL", "-U"}, ExposedPorts: defaultExposedPorts, } hostCfg := &container.HostConfig{