mirror of https://github.com/cbeuw/Cloak
Minor error prompt and listen to :80 and :443 by default
This commit is contained in:
parent
63f3b4a89f
commit
8a6f6b6088
|
|
@ -256,6 +256,9 @@ func main() {
|
|||
}
|
||||
|
||||
if !pluginMode && len(sta.BindAddr) == 0 {
|
||||
https, _ := net.ResolveTCPAddr("tcp", ":443")
|
||||
http, _ := net.ResolveTCPAddr("tcp", ":80")
|
||||
sta.BindAddr = []net.Addr{https, http}
|
||||
log.Fatalf("bind address cannot be empty")
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
"BypassUID": [
|
||||
"1rmq6Ag1jZJCImLBIL5wzQ=="
|
||||
],
|
||||
"RedirAddr": "204.79.197.200:443",
|
||||
"RedirAddr": "204.79.197.200",
|
||||
"PrivateKey": "EN5aPEpNBO+vw+BtFQY2OnK9bQU7rvEj5qmnmgwEtUc=",
|
||||
"AdminUID": "5nneblJy6lniPJfr81LuYQ==",
|
||||
"DatabasePath": "userinfo.db",
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
"github.com/cbeuw/Cloak/internal/server/usermanager"
|
||||
"github.com/sirupsen/logrus"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"strings"
|
||||
|
|
@ -93,7 +94,8 @@ func (sta *State) ParseConfig(conf string) (err error) {
|
|||
|
||||
sta.RedirAddr, err = net.ResolveIPAddr("ip", preParse.RedirAddr)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to resolve RedirAddr: %v", err)
|
||||
logrus.Error("If RedirAddr contains a port number, please remove it.")
|
||||
return fmt.Errorf("unable to resolve RedirAddr: %v. ", err)
|
||||
}
|
||||
|
||||
for _, addr := range preParse.BindAddr {
|
||||
|
|
|
|||
Loading…
Reference in New Issue