1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-12 07:19:01 -05:00

default freedom timeout to 600

This commit is contained in:
Darien Raymond 2017-01-27 09:01:39 +01:00
parent ea728d5112
commit 32abea1397
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -12,9 +12,9 @@ import (
)
type FreedomConfig struct {
DomainStrategy string `json:"domainStrategy"`
Timeout uint32 `json:"timeout"`
Redirect string `json:"redirect"`
DomainStrategy string `json:"domainStrategy"`
Timeout *uint32 `json:"timeout"`
Redirect string `json:"redirect"`
}
func (v *FreedomConfig) Build() (*serial.TypedMessage, error) {
@ -24,7 +24,10 @@ func (v *FreedomConfig) Build() (*serial.TypedMessage, error) {
if domainStrategy == "useip" || domainStrategy == "use_ip" {
config.DomainStrategy = freedom.Config_USE_IP
}
config.Timeout = v.Timeout
config.Timeout = 600
if v.Timeout != nil {
config.Timeout = *v.Timeout
}
if len(v.Redirect) > 0 {
host, portStr, err := net.SplitHostPort(v.Redirect)
if err != nil {