http.go 323 B

123456789101112131415161718
  1. package conf
  2. import (
  3. "v2ray.com/core/common/serial"
  4. "v2ray.com/core/proxy/http"
  5. )
  6. type HttpServerConfig struct {
  7. Timeout uint32 `json:"timeout"`
  8. }
  9. func (v *HttpServerConfig) Build() (*serial.TypedMessage, error) {
  10. config := &http.ServerConfig{
  11. Timeout: v.Timeout,
  12. }
  13. return serial.ToTypedMessage(config), nil
  14. }