mirror of https://github.com/cbeuw/Cloak
Allow remote host to be set in the client config file
This commit is contained in:
parent
d482661494
commit
2327420f75
|
|
@ -277,7 +277,6 @@ func main() {
|
|||
sta := &client.State{
|
||||
LocalHost: localHost,
|
||||
LocalPort: localPort,
|
||||
RemoteHost: remoteHost,
|
||||
RemotePort: remotePort,
|
||||
Now: time.Now,
|
||||
}
|
||||
|
|
@ -291,6 +290,10 @@ func main() {
|
|||
sta.ProxyMethod = proxyMethod
|
||||
}
|
||||
|
||||
if remoteHost != "" {
|
||||
sta.RemoteHost = remoteHost
|
||||
}
|
||||
|
||||
if os.Getenv("SS_LOCAL_HOST") != "" {
|
||||
sta.ProxyMethod = "shadowsocks"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ type rawConfig struct {
|
|||
Transport string
|
||||
NumConn int
|
||||
StreamTimeout int
|
||||
RemoteHost string
|
||||
RemotePort int
|
||||
}
|
||||
|
||||
|
|
@ -128,6 +129,7 @@ func (sta *State) ParseConfig(conf string) (err error) {
|
|||
sta.Transport = DirectTLS{}
|
||||
}
|
||||
|
||||
sta.RemoteHost = preParse.RemoteHost
|
||||
sta.ProxyMethod = preParse.ProxyMethod
|
||||
sta.ServerName = preParse.ServerName
|
||||
sta.NumConn = preParse.NumConn
|
||||
|
|
|
|||
Loading…
Reference in New Issue