Fix: grpc transport path should not escape
This commit is contained in:
parent
f7abb313c8
commit
cb4ddfc8ca
3 changed files with 4 additions and 2 deletions
|
@ -24,7 +24,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"grpcSettings": {
|
"grpcSettings": {
|
||||||
"serviceName": "example"
|
"serviceName": "example!"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -335,7 +335,7 @@ func TestClash_VmessGrpc(t *testing.T) {
|
||||||
UDP: true,
|
UDP: true,
|
||||||
ServerName: "example.org",
|
ServerName: "example.org",
|
||||||
GrpcOpts: outbound.GrpcOptions{
|
GrpcOpts: outbound.GrpcOptions{
|
||||||
GrpcServiceName: "example",
|
GrpcServiceName: "example!",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -211,6 +211,8 @@ func StreamGunWithTransport(transport *http2.Transport, cfg *Config) (net.Conn,
|
||||||
Scheme: "https",
|
Scheme: "https",
|
||||||
Host: cfg.Host,
|
Host: cfg.Host,
|
||||||
Path: fmt.Sprintf("/%s/Tun", serviceName),
|
Path: fmt.Sprintf("/%s/Tun", serviceName),
|
||||||
|
// for unescape path
|
||||||
|
Opaque: fmt.Sprintf("//%s/%s/Tun", cfg.Host, serviceName),
|
||||||
},
|
},
|
||||||
Proto: "HTTP/2",
|
Proto: "HTTP/2",
|
||||||
ProtoMajor: 2,
|
ProtoMajor: 2,
|
||||||
|
|
Loading…
Reference in a new issue