diff --git a/test/config/vmess-grpc.json b/test/config/vmess-grpc.json index 1b3a8e9a..22e11763 100644 --- a/test/config/vmess-grpc.json +++ b/test/config/vmess-grpc.json @@ -24,7 +24,7 @@ ] }, "grpcSettings": { - "serviceName": "example" + "serviceName": "example!" } } } diff --git a/test/vmess_test.go b/test/vmess_test.go index de3b2ba6..7791abee 100644 --- a/test/vmess_test.go +++ b/test/vmess_test.go @@ -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 { diff --git a/transport/gun/gun.go b/transport/gun/gun.go index f19006ad..3f97121f 100644 --- a/transport/gun/gun.go +++ b/transport/gun/gun.go @@ -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,