2016-10-17 08:35:13 -04:00
|
|
|
package conf
|
|
|
|
|
|
|
|
import (
|
2016-12-15 05:51:09 -05:00
|
|
|
"v2ray.com/core/common/serial"
|
2016-10-17 08:35:13 -04:00
|
|
|
"v2ray.com/core/proxy/http"
|
|
|
|
)
|
|
|
|
|
|
|
|
type HttpServerConfig struct {
|
|
|
|
Timeout uint32 `json:"timeout"`
|
|
|
|
}
|
|
|
|
|
2016-12-15 05:51:09 -05:00
|
|
|
func (v *HttpServerConfig) Build() (*serial.TypedMessage, error) {
|
2016-10-17 08:35:13 -04:00
|
|
|
config := &http.ServerConfig{
|
2016-11-27 15:39:09 -05:00
|
|
|
Timeout: v.Timeout,
|
2016-10-17 08:35:13 -04:00
|
|
|
}
|
|
|
|
|
2016-12-15 05:51:09 -05:00
|
|
|
return serial.ToTypedMessage(config), nil
|
2016-10-17 08:35:13 -04:00
|
|
|
}
|