From badc454452cf153e5713bb4384d9239cec16c8d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Sat, 8 Oct 2022 20:30:52 +0800 Subject: [PATCH] Fix test --- test/go.mod | 2 +- test/go.sum | 4 ++-- test/shadowtls_test.go | 8 ++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/test/go.mod b/test/go.mod index dd2b2eaa..dfc4aadf 100644 --- a/test/go.mod +++ b/test/go.mod @@ -10,7 +10,7 @@ require ( github.com/docker/docker v20.10.18+incompatible github.com/docker/go-connections v0.4.0 github.com/gofrs/uuid v4.3.0+incompatible - github.com/sagernet/sing v0.0.0-20221006081821-c4e9bf11fa00 + github.com/sagernet/sing v0.0.0-20221008120626-60a9910eefe4 github.com/sagernet/sing-shadowsocks v0.0.0-20220819002358-7461bb09a8f6 github.com/spyzhov/ajson v0.7.1 github.com/stretchr/testify v1.8.0 diff --git a/test/go.sum b/test/go.sum index 15ca3f9b..25b5b944 100644 --- a/test/go.sum +++ b/test/go.sum @@ -165,8 +165,8 @@ github.com/sagernet/quic-go v0.0.0-20220818150011-de611ab3e2bb h1:wc0yQ+SBn4TaTY github.com/sagernet/quic-go v0.0.0-20220818150011-de611ab3e2bb/go.mod h1:MIccjRKnPTjWwAOpl+AUGWOkzyTd9tERytudxu+1ra4= github.com/sagernet/sing v0.0.0-20220812082120-05f9836bff8f/go.mod h1:QVsS5L/ZA2Q5UhQwLrn0Trw+msNd/NPGEhBKR/ioWiY= github.com/sagernet/sing v0.0.0-20220817130738-ce854cda8522/go.mod h1:QVsS5L/ZA2Q5UhQwLrn0Trw+msNd/NPGEhBKR/ioWiY= -github.com/sagernet/sing v0.0.0-20221006081821-c4e9bf11fa00 h1:UkgEDnH3L9eBxob+3AbE9wM4mjFnRLnaPjfLSNe+C74= -github.com/sagernet/sing v0.0.0-20221006081821-c4e9bf11fa00/go.mod h1:zvgDYKI+vCAW9RyfyrKTgleI+DOa8lzHMPC7VZo3OL4= +github.com/sagernet/sing v0.0.0-20221008120626-60a9910eefe4 h1:LO7xMvMGhYmjQg2vjhTzsODyzs9/WLYu5Per+/8jIeo= +github.com/sagernet/sing v0.0.0-20221008120626-60a9910eefe4/go.mod h1:zvgDYKI+vCAW9RyfyrKTgleI+DOa8lzHMPC7VZo3OL4= github.com/sagernet/sing-dns v0.0.0-20220929010544-ee843807aae3 h1:AEdyJxEDFq38z0pBX/0MpikQapGMIch+1ADe9k1bJqU= github.com/sagernet/sing-dns v0.0.0-20220929010544-ee843807aae3/go.mod h1:SrvWLfOSlnFmH32CWXicfilAGgIXR0VjrH6yRbuXYww= github.com/sagernet/sing-shadowsocks v0.0.0-20220819002358-7461bb09a8f6 h1:JJfDeYYhWunvtxsU/mOVNTmFQmnzGx9dY034qG6G3g4= diff --git a/test/shadowtls_test.go b/test/shadowtls_test.go index d20b1b24..588f3df7 100644 --- a/test/shadowtls_test.go +++ b/test/shadowtls_test.go @@ -27,6 +27,12 @@ func TestShadowTLS(t *testing.T) { func testShadowTLS(t *testing.T, password string) { method := shadowaead_2022.List[0] ssPassword := mkBase64(t, 16) + var version int + if password != "" { + version = 2 + } else { + version = 1 + } startInstance(t, option.Options{ Inbounds: []option.Inbound{ { @@ -53,6 +59,7 @@ func testShadowTLS(t *testing.T, password string) { ServerPort: 443, }, }, + Version: version, Password: password, }, }, @@ -95,6 +102,7 @@ func testShadowTLS(t *testing.T, password string) { Enabled: true, ServerName: "google.com", }, + Version: version, Password: password, }, },