Giter Site home page Giter Site logo

Comments (13)

fscarmen avatar fscarmen commented on July 3, 2024

1.行11.
找不到timedatectl set-timezone Asia/Shanghai

这行可以不要了,你直接删掉整行可以了。这个作用是显示把显示UTC时间改为北京时间。这块我已经在创建镜像的时候在alpine基础系统里处理了。留下脚本这行是我从解锁脚本里复制过来的时候漏删掉的。这个不会导致脚本不能运行的,我长时间这样使用了。

2.行12.
判断进不去.
$(pgrep -laf ^[/d]*bash.*warp_unlock | awk -F, '{a[$2]++}END{for (i in a) print i" "a[i]}')
打印结果为3

这个是正常的,说明正在刷了。这个作用是脚本自锁。具体说,因为脚本是5分钟检测一次,不解锁就运行的 。如果不加这个自锁的情况下,第1个5分钟检测运行脚本不断解锁,但过了5分钟仍然未找到适合的ip,第2个检测又来,又再运行一个解锁脚本,这样就会同时存在两个都在刷的脚本,如时间更长,并行运行就越多,不但浪费资源,还相互影响。加这个就是第2个5分钟运行的时候判断进程里已经有在运行中了,就不作任何处理了。

你可以通过以下两个方式判断一下工作状态,容器内 ps -T | grep warppgrep -laf warp

判断现在的IP是否在变curl -ks4m5 ip.gs,这个要有间隔的进去看

这个是我测试的信息
image

from warp_unlock.

ukid avatar ukid commented on July 3, 2024

感谢您的回复!

我也奇怪呢,我有一台美国机器,确实有收到电报消息,排除完全不能用。

bash-5.1# ps -T | grep warp
11882 root      0:00 grep warp
bash-5.1# pgrep -laf warp
bash-5.1# bash /etc/wireguard/warp_unlock.sh 
3

如上,此时并没有脚本在执行,但是
$(pgrep -laf ^[/d]*bash.*warp_unlock | awk -F, '{a[$2]++}END{for (i in a) print i" "a[i]}')
打印结果为3

是否能加上点日志输出方便诊断?多谢🙏

目前这台机器的情况是IP刷新失败,status.log中只有null.

from warp_unlock.

ukid avatar ukid commented on July 3, 2024

另外一个现象是初始化安装时无法获取地区,不知道是否关联

root@VPS12155434:~# bash <(curl -sSL https://raw.githubusercontent.com/fscarmen/warp_unlock/main/docker.sh)
 The current region is . Confirm press [y] . If you want another regions, please enter the two-digit region abbreviation. (such as hk,sg. Default is ): 

from warp_unlock.

ukid avatar ukid commented on July 3, 2024

更多日志

root@VPS12155434:~# docker exec -it wgcf bash
bash-5.1# curl -ks4m5 ip.gs
8.31.163.75
bash-5.1# cat status.log 
null
bash-5.1# crontab -l
# do daily/weekly/monthly maintenance
# min   hour    day     month   weekday command
*/15    *       *       *       *       run-parts /etc/periodic/15min
0       *       *       *       *       run-parts /etc/periodic/hourly
0       2       *       *       *       run-parts /etc/periodic/daily
0       3       *       *       6       run-parts /etc/periodic/weekly
0       5       1       *       *       run-parts /etc/periodic/monthly

*/5 * * * * nohup bash /etc/wireguard/warp_unlock.sh >/dev/null 2>&1 &
bash-5.1# date
Wed Mar  2 13:36:56 CST 2022
bash-5.1# date
Wed Mar  2 13:42:26 CST 2022
bash-5.1# cat status.log 
null

from warp_unlock.

fscarmen avatar fscarmen commented on July 3, 2024

另外一个现象是初始化安装时无法获取地区,不知道是否关联

root@VPS12155434:~# bash <(curl -sSL https://raw.githubusercontent.com/fscarmen/warp_unlock/main/docker.sh)
 The current region is . Confirm press [y] . If you want another regions, please enter the two-digit region abbreviation. (such as hk,sg. Default is ): 

这个获取不到 IP ,在在宿主机运行的时候在 ip.gs 获取 IP等信息超时导致的,你再试运行多几次,只看开始的时候前面有没有 IP,后面有没有默认地区即可。

更多日志

cat status.log 显示 null 是因为没有到5分钟的整数,脚本还没有运行,奈飞的解锁状态未知。
在奈飞能解锁,这个值为 Yes,如果不能解锁,这个值为No的

from warp_unlock.

ukid avatar ukid commented on July 3, 2024

看时间已经过了5分钟了呢,到目前时间点

bash-5.1# date
Wed Mar  2 13:52:48 CST 2022
bash-5.1# cat status.log 
nul

from warp_unlock.

fscarmen avatar fscarmen commented on July 3, 2024

我这里没有问题哦,不太知道为什么你的定时没有起来

root@hk:~# docker exec -it wgcf bash
bash-5.1# ls
gost        run.sh      status.log
bash-5.1# cat status.log
No 😰
bash-5.1# 

from warp_unlock.

ukid avatar ukid commented on July 3, 2024

好吧,我先不使用docker了,等待其他用户反馈🙏

from warp_unlock.

fscarmen avatar fscarmen commented on July 3, 2024

你把11行 timedatectl set-timezone Asia/Shanghai 删掉,手动运行仍然起不来吗?

from warp_unlock.

ukid avatar ukid commented on July 3, 2024

起不来,12行判断进不去。

from warp_unlock.

fscarmen avatar fscarmen commented on July 3, 2024

我又找多台甲骨文东京的试,也是没有问题哦
你这样处理,重启一下容器
docker restart wgcf
然后等5分钟的整数

[root@tokyo2 /]# docker restart wgcf
wgcf
[root@tokyo2 /]# docker exec -it wgcf pgrep -laf warp
60 bash /etc/wireguard/warp_unlock.sh

我觉得这个方案和iptable方案是最佳方案的了

from warp_unlock.

aguero119 avatar aguero119 commented on July 3, 2024

这玩意儿这么卸载?

from warp_unlock.

fscarmen avatar fscarmen commented on July 3, 2024

docker 吗?

docker rm -f wgcf; docker images | grep unlock | awk '{print $3}'

from warp_unlock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.