Ip限制 npc代理连接

This commit is contained in:
刘河
2019-02-16 20:43:26 +08:00
parent 9f6b33a62b
commit 3b18d66835
64 changed files with 1414 additions and 132 deletions

View File

@@ -11,6 +11,7 @@ const (
WORK_MAIN = "main"
WORK_CHAN = "chan"
WORK_CONFIG = "conf"
WORK_REGISTER = "rgst"
WORK_STATUS = "stus"
RES_SIGN = "sign"
RES_MSG = "msg0"

View File

@@ -59,7 +59,7 @@ func GetLogPath() string {
func GetTmpPath() string {
var path string
if IsWindows() {
path = "./"
path = GetRunPath()
} else {
path = "/tmp"
}

View File

@@ -241,3 +241,8 @@ func FormatAddress(s string) string {
}
return "127.0.0.1:" + s
}
func GetIpByAddr(addr string) string {
arr := strings.Split(addr, ":")
return arr[0]
}