🎨 逻辑优化

This commit is contained in:
李寻欢
2023-12-10 08:19:21 +08:00
parent 3bc95e1317
commit 3fbaf7aeb6
3 changed files with 8 additions and 4 deletions

View File

@@ -29,7 +29,11 @@ func ClearCallback() {
// @param host
func SetCallback(userHost string) {
// 获取本机IP地址
host := net.ParseIP(netutil.GetInternalIp()).String()
host := userHost
if userHost == "auto" {
host = net.ParseIP(netutil.GetInternalIp()).String()
}
port := 19099
if userHost != "" {
uh := strings.Split(strings.TrimSpace(userHost), ":")