mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-06-08 11:44:13 +08:00
Fix server create
This commit is contained in:
parent
d6dce7e634
commit
4360e71743
@ -38,9 +38,11 @@ func NewServer(ctx context.Context, options option.V2RayGRPCOptions, tlsConfig *
|
|||||||
errorHandler: errorHandler,
|
errorHandler: errorHandler,
|
||||||
path: fmt.Sprintf("/%s/Tun", url.QueryEscape(options.ServiceName)),
|
path: fmt.Sprintf("/%s/Tun", url.QueryEscape(options.ServiceName)),
|
||||||
}
|
}
|
||||||
|
if tlsConfig != nil {
|
||||||
if !common.Contains(tlsConfig.NextProtos, "h2") {
|
if !common.Contains(tlsConfig.NextProtos, "h2") {
|
||||||
tlsConfig.NextProtos = append(tlsConfig.NextProtos, "h2")
|
tlsConfig.NextProtos = append(tlsConfig.NextProtos, "h2")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
server.httpServer = &http.Server{
|
server.httpServer = &http.Server{
|
||||||
Handler: server,
|
Handler: server,
|
||||||
TLSConfig: tlsConfig,
|
TLSConfig: tlsConfig,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user