fix default ssk port selection

This commit is contained in:
Umputun 2021-05-03 21:52:08 -05:00
parent 4c051ca37f
commit 5c1ab356cc
2 changed files with 4 additions and 4 deletions

View File

@ -346,9 +346,9 @@ func listenAddress(addr, sslType string) string {
// https, set default to 8443 in docker, 443 without
if v, ok := os.LookupEnv("REPROXY_IN_DOCKER"); ok && (v == "1" || v == "true") {
return "0.0.0.0:443"
return "0.0.0.0:8443"
}
return "127.0.0.1:8443"
return "127.0.0.1:443"
}
func redirHTTPPort(port int) int {

View File

@ -185,8 +185,8 @@ func Test_listenAddress(t *testing.T) {
}{
{"", "none", "1", "0.0.0.0:8080"},
{"", "none", "0", "127.0.0.1:80"},
{"", "auto", "false", "127.0.0.1:8443"},
{"", "auto", "true", "0.0.0.0:443"},
{"", "auto", "false", "127.0.0.1:443"},
{"", "auto", "true", "0.0.0.0:8443"},
{"127.0.0.1:8081", "none", "true", "127.0.0.1:8081"},
{"192.168.1.1:8081", "none", "false", "192.168.1.1:8081"},
{"127.0.0.1:8080", "none", "0", "127.0.0.1:8080"},