Add Snell protocol. Refactor MASQUE HTTP/2, Fair Queue. Update XHTTP, OpenVPN, Sudoku, Fallback. Fixes

This commit is contained in:
Shtorm
2026-06-26 01:25:57 +03:00
parent d174962a04
commit edf38d33d6
107 changed files with 5346 additions and 708 deletions

View File

@@ -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,
}

View File

@@ -0,0 +1,10 @@
package v2raygrpclite
import "strings"
func grpcPath(serviceName string) string {
if strings.Contains(serviceName, "/") {
return serviceName
}
return "/" + serviceName + "/Tun"
}

View File

@@ -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),
},