v2ray-core/tools/conf/http.go

19 lines
326 B
Go
Raw Normal View History

2016-10-17 12:35:13 +00:00
package conf
import (
"v2ray.com/core/common/loader"
"v2ray.com/core/proxy/http"
)
type HttpServerConfig struct {
Timeout uint32 `json:"timeout"`
}
2016-11-27 20:39:09 +00:00
func (v *HttpServerConfig) Build() (*loader.TypedSettings, error) {
2016-10-17 12:35:13 +00:00
config := &http.ServerConfig{
2016-11-27 20:39:09 +00:00
Timeout: v.Timeout,
2016-10-17 12:35:13 +00:00
}
return loader.NewTypedSettings(config), nil
}