Fix incorrect config field name for remote port in plugin mode

This commit is contained in:
Kirill Buev 2020-04-07 09:05:44 +03:00
parent e8af6233c1
commit ba5d903539

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")