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:
parent
ea728d5112
commit
32abea1397
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user