Add BaseContext to http servers

This commit is contained in:
H1JK authored and 世界 committed 2023-04-21 17:48:29 +08:00
1 parent d5f94b65b7
commit e1d96cb64e
4 files changed
+12

No files matched your search

+3
View File
@@ -52,6 +52,9 @@ func NewServer(ctx context.Context, options option.V2RayWebsocketOptions, tlsCon
Handler: server,
ReadHeaderTimeout: C.TCPTimeout,
MaxHeaderBytes: http.DefaultMaxHeaderBytes,
BaseContext: func(net.Listener) context.Context {
return ctx
},
}
return server, nil
}