Merge remote-tracking branch 'origin/master'

This commit is contained in:
Andy Wang 2020-04-08 22:17:32 +01:00
commit 8cf7b60f4e

View File

@ -6,10 +6,11 @@ import (
"encoding/base64" "encoding/base64"
"flag" "flag"
"fmt" "fmt"
"os"
"github.com/cbeuw/Cloak/internal/client" "github.com/cbeuw/Cloak/internal/client"
mux "github.com/cbeuw/Cloak/internal/multiplex" mux "github.com/cbeuw/Cloak/internal/multiplex"
log "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus"
"os"
) )
var version string var version string
@ -84,7 +85,7 @@ func main() {
rawConfig.RemoteHost = os.Getenv("SS_REMOTE_HOST") rawConfig.RemoteHost = os.Getenv("SS_REMOTE_HOST")
} }
if rawConfig.RemotePort == "" { if rawConfig.RemotePort == "" {
rawConfig.RemoteHost = os.Getenv("SS_REMOTE_PORT") rawConfig.RemotePort = os.Getenv("SS_REMOTE_PORT")
} }
if rawConfig.LocalHost == "" { if rawConfig.LocalHost == "" {
rawConfig.LocalHost = os.Getenv("SS_LOCAL_HOST") rawConfig.LocalHost = os.Getenv("SS_LOCAL_HOST")