mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-12 22:42:18 +00:00
json config parser
This commit is contained in:
85 files changed
+9357
-9052
No files matched your search
@@ -0,0 +1,18 @@
|
||||
package conf
|
||||
|
||||
import (
|
||||
"v2ray.com/core/common/loader"
|
||||
"v2ray.com/core/proxy/http"
|
||||
)
|
||||
|
||||
type HttpServerConfig struct {
|
||||
Timeout uint32 `json:"timeout"`
|
||||
}
|
||||
|
||||
func (this *HttpServerConfig) Build() (*loader.TypedSettings, error) {
|
||||
config := &http.ServerConfig{
|
||||
Timeout: this.Timeout,
|
||||
}
|
||||
|
||||
return loader.NewTypedSettings(config), nil
|
||||
}
|
||||
Reference in new issue
Block a user