diff --git a/README.md b/README.md index a1bca50..b69ae1b 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ root@NIUYULING:/mnt/c/Users/root/Desktop/git.aixiao.me/DenyIP-go# ### 安装 ```bash -root@NG-FROM:~# wget https://git.aixiao.me/aixiao/DenyIP-go/raw/branch/main/install.sh +root@NG-FROM:~# wget -O install.sh https://git.aixiao.me/aixiao/DenyIP-go/raw/branch/main/install.sh --2025-01-15 10:56:09-- https://git.aixiao.me/aixiao/DenyIP-go/raw/branch/main/install.sh Resolving git.aixiao.me (git.aixiao.me)... 47.240.75.93 Connecting to git.aixiao.me (git.aixiao.me)|47.240.75.93|:443... connected. diff --git a/denyip b/denyip index c56e583..afb18ef 100644 Binary files a/denyip and b/denyip differ diff --git a/main.go b/main.go index 35664ef..d5b60a2 100644 --- a/main.go +++ b/main.go @@ -18,7 +18,7 @@ import ( var ( daemon = flag.Bool("d", false, "守护进程模式") - child = flag.Bool("child", false, "子进程模式") + child = flag.Bool("child", false, "子进程模式, (不要使用!!!)") ) // 全局变量 @@ -181,10 +181,11 @@ func runMainProcess() { // 主进程逻辑 log.Printf("获取Ip地域出错: %v", err) } else { log.Printf("\033[31m%s %s\033[0m\n", e1.Value.(net.IP).String(), position) // 打印地域 - if !strings.Contains(position, "中国") && !strings.Contains(position, "内网") { AddIPSet(IPSET_NAME, e1.Value.(net.IP).String()) // 添加 Ip 到 ipset 集合 IpList.Remove(e1) // 移除第一个元素 + } else { // 这时是国内地址 + IpList.Remove(e1) // 移除第一个元素 } } } else { // 这时是国内地址