This commit is contained in:
世界
2022-10-31 13:54:24 +08:00
parent 01eb5b723e
commit ff9df30773
3 changed files with 52 additions and 100 deletions

View File

@@ -139,6 +139,7 @@ func TestShadowTLSv2Fallback(t *testing.T) {
ServerPort: 443,
},
},
Version: 2,
Password: "hello",
},
},
@@ -155,6 +156,7 @@ func TestShadowTLSv2Fallback(t *testing.T) {
response, err := client.Get("https://google.com")
require.NoError(t, err)
require.Equal(t, response.StatusCode, 200)
response.Body.Close()
client.CloseIdleConnections()
}
@@ -261,25 +263,6 @@ func TestShadowTLSOutbound(t *testing.T) {
},
},
},
{
Type: C.TypeShadowTLS,
Tag: "in",
ShadowTLSOptions: option.ShadowTLSInboundOptions{
ListenOptions: option.ListenOptions{
Listen: option.ListenAddress(netip.IPv4Unspecified()),
ListenPort: serverPort,
Detour: "detour",
},
Handshake: option.ShadowTLSHandshakeOptions{
ServerOptions: option.ServerOptions{
Server: "google.com",
ServerPort: 443,
},
},
Version: 2,
Password: password,
},
},
{
Type: C.TypeShadowsocks,
Tag: "detour",
@@ -319,6 +302,7 @@ func TestShadowTLSOutbound(t *testing.T) {
Enabled: true,
ServerName: "google.com",
},
Version: 2,
Password: "hello",
},
},