http.go 332 B

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