Fix: grpc transport path should not escape

This commit is contained in:
Dreamacro 2021-08-19 22:11:56 +08:00
parent 47044ec0d8
commit 847f41952e
3 changed files with 4 additions and 2 deletions

View File

@ -24,7 +24,7 @@
]
},
"grpcSettings": {
"serviceName": "example"
"serviceName": "example!"
}
}
}

View File

@ -335,7 +335,7 @@ func TestClash_VmessGrpc(t *testing.T) {
UDP: true,
ServerName: "example.org",
GrpcOpts: outbound.GrpcOptions{
GrpcServiceName: "example",
GrpcServiceName: "example!",
},
})
if err != nil {

View File

@ -211,6 +211,8 @@ func StreamGunWithTransport(transport *http2.Transport, cfg *Config) (net.Conn,
Scheme: "https",
Host: cfg.Host,
Path: fmt.Sprintf("/%s/Tun", serviceName),
// for unescape path
Opaque: fmt.Sprintf("//%s/%s/Tun", cfg.Host, serviceName),
},
Proto: "HTTP/2",
ProtoMajor: 2,