mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-06-27 20:52:40 +03:00
Add Snell protocol. Refactor MASQUE HTTP/2, Fair Queue. Update XHTTP, OpenVPN, Sudoku, Fallback. Fixes
This commit is contained in:
@@ -53,10 +53,9 @@ func NewClient(ctx context.Context, dialer N.Dialer, serverAddr M.Socksaddr, opt
|
||||
DisableCompression: true,
|
||||
},
|
||||
url: &url.URL{
|
||||
Scheme: "https",
|
||||
Host: serverAddr.String(),
|
||||
Path: "/" + options.ServiceName + "/Tun",
|
||||
RawPath: "/" + url.PathEscape(options.ServiceName) + "/Tun",
|
||||
Scheme: "https",
|
||||
Host: serverAddr.String(),
|
||||
Path: grpcPath(options.ServiceName),
|
||||
},
|
||||
host: host,
|
||||
}
|
||||
|
||||
10
transport/v2raygrpclite/path.go
Normal file
10
transport/v2raygrpclite/path.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package v2raygrpclite
|
||||
|
||||
import "strings"
|
||||
|
||||
func grpcPath(serviceName string) string {
|
||||
if strings.Contains(serviceName, "/") {
|
||||
return serviceName
|
||||
}
|
||||
return "/" + serviceName + "/Tun"
|
||||
}
|
||||
@@ -42,7 +42,7 @@ func NewServer(ctx context.Context, logger logger.ContextLogger, options option.
|
||||
tlsConfig: tlsConfig,
|
||||
logger: logger,
|
||||
handler: handler,
|
||||
path: "/" + options.ServiceName + "/Tun",
|
||||
path: grpcPath(options.ServiceName),
|
||||
h2Server: &http2.Server{
|
||||
IdleTimeout: time.Duration(options.IdleTimeout),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user