mirror of https://github.com/cbeuw/Cloak
Add default stream timeout value to client
This commit is contained in:
parent
6f34229aa0
commit
f90ad52455
|
|
@ -129,7 +129,11 @@ func (sta *State) ParseConfig(conf string) (err error) {
|
||||||
sta.ProxyMethod = preParse.ProxyMethod
|
sta.ProxyMethod = preParse.ProxyMethod
|
||||||
sta.ServerName = preParse.ServerName
|
sta.ServerName = preParse.ServerName
|
||||||
sta.NumConn = preParse.NumConn
|
sta.NumConn = preParse.NumConn
|
||||||
|
if preParse.StreamTimeout == 0 {
|
||||||
|
sta.Timeout = 300 * time.Second
|
||||||
|
} else {
|
||||||
sta.Timeout = time.Duration(preParse.StreamTimeout) * time.Second
|
sta.Timeout = time.Duration(preParse.StreamTimeout) * time.Second
|
||||||
|
}
|
||||||
sta.UID = preParse.UID
|
sta.UID = preParse.UID
|
||||||
|
|
||||||
pub, ok := ecdh.Unmarshal(preParse.PublicKey)
|
pub, ok := ecdh.Unmarshal(preParse.PublicKey)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue