Set ProxyMethod to shadowsocks automatically if started as a shadowsocks plugin

This commit is contained in:
Qian Wang 2019-06-16 23:59:49 +10:00
parent c88c3d0084
commit 0e71b052dc
1 changed files with 4 additions and 0 deletions

View File

@ -151,6 +151,10 @@ func main() {
log.Fatal(err)
}
if os.Getenv("SS_LOCAL_HOST") != "" {
sta.ProxyMethod = "shadowsocks"
}
if sta.LocalPort == "" {
log.Fatal("Must specify localPort")
}