Fix leaks and add test

This commit is contained in:
世界
2022-09-23 13:14:31 +08:00
parent ab7478a80c
commit 01865024b0
19 changed files with 167 additions and 59 deletions

View File

@@ -17,6 +17,10 @@ var muxProtocols = []mux.Protocol{
mux.ProtocolSMux,
}
func TestVMessSMux(t *testing.T) {
testVMessMux(t, mux.ProtocolSMux.String())
}
func TestShadowsocksMux(t *testing.T) {
for _, protocol := range muxProtocols {
t.Run(protocol.String(), func(t *testing.T) {
@@ -25,14 +29,6 @@ func TestShadowsocksMux(t *testing.T) {
}
}
func TestVMessMux(t *testing.T) {
for _, protocol := range muxProtocols {
t.Run(protocol.String(), func(t *testing.T) {
testVMessMux(t, protocol.String())
})
}
}
func testShadowsocksMux(t *testing.T, protocol string) {
method := shadowaead_2022.List[0]
password := mkBase64(t, 16)