Skip to content

Commit

Permalink
plugin: compatible with shadowsocks-android 5.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
IrineSistiana committed Oct 27, 2020
1 parent ee69fb1 commit a097f98
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func main() {
commandLine.StringVar(&ca, "ca", "", "PEM CA file path")
commandLine.StringVar(&cca, "cca", "", "base64 encoded PEM CA")
commandLine.BoolVar(&insecureSkipVerify, "no-verify", false, "client won't verify the server's certificate chain and host name")
commandLine.BoolVar(&vpn, "V", false, "DO NOT USE, this is for android vpn mode")

// server only
commandLine.BoolVar(&isServer, "s", false, "is server")
Expand Down Expand Up @@ -149,12 +150,16 @@ func main() {
if sip003Args != nil {
log.Print("main: simple-tls is running as a sip003 plugin")

// android only
_, vpn = sip003Args.SS_PLUGIN_OPTIONS["V"]

var ok bool
var s string

// android only
_, ok = sip003Args.SS_PLUGIN_OPTIONS["V"]
vpn = vpn || ok
_, ok = sip003Args.SS_PLUGIN_OPTIONS["__android_vpn"]
vpn = vpn || ok

// common
s, _ = sip003Args.SS_PLUGIN_OPTIONS["b"]
setStrIfNotEmpty(&bindAddr, s)
s, _ = sip003Args.SS_PLUGIN_OPTIONS["d"]
Expand Down

0 comments on commit a097f98

Please sign in to comment.