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,8 +38,10 @@ func NewServer(ctx context.Context, options option.V2RayGRPCOptions, tlsConfig *
|
||||
errorHandler: errorHandler,
|
||||
path: fmt.Sprintf("/%s/Tun", url.QueryEscape(options.ServiceName)),
|
||||
}
|
||||
if !common.Contains(tlsConfig.NextProtos, "h2") {
|
||||
tlsConfig.NextProtos = append(tlsConfig.NextProtos, "h2")
|
||||
if tlsConfig != nil {
|
||||
if !common.Contains(tlsConfig.NextProtos, "h2") {
|
||||
tlsConfig.NextProtos = append(tlsConfig.NextProtos, "h2")
|
||||
}
|
||||
}
|
||||
server.httpServer = &http.Server{
|
||||
Handler: server,
|
||||
|
Loading…
x
Reference in New Issue
Block a user