Replies: 54 comments
-
你这是现成的脚本?还是命令步骤?给我看蒙了都。。。颠三倒四的感觉。。。 我以前给一个 openwrt 上用 passwall 的也折腾过,不过我对 openwrt 不熟悉,只是帮写了个脚本,并远程协助配置了下。。。 |
Beta Was this translation helpful? Give feedback.
-
你想要表达的意思是不是这个: 运行 CloudflareST 测速(注意 -tp 默认值就是 443 因此可以省略),
获取最快 IP,
然后判断一下是否获取到了最快 IP(如果没有就退出脚本):
然后这样修改 passwall 里的 IP?
最后再重启一下?
|
Beta Was this translation helpful? Give feedback.
-
感谢大佬,openwrt也是linux系统吧。怎么感觉好像没有测速吧,我试了可以很快就完成替换。还是很感谢你抽时间帮助 |
Beta Was this translation helpful? Give feedback.
-
有需要,我可以提供远程协助帮忙解决一些问题,虽然我对 openwrt 不熟,但是对 Linux、Shell 脚本什么的比较熟。 顺便可以帮你完善一下脚本,这样这个 Issues 也能帮到后来者~ 远程协助软件(这个是只有被控功能的单文件版),告诉我你的设备代码、临时密码(我看到后会删除)。 |
Beta Was this translation helpful? Give feedback.
-
你发的是 better-cloudflare-ip 项目的脚本文件呀。。。 |
Beta Was this translation helpful? Give feedback.
-
可是你发的这个脚本我和项目也没啥关系呀。。。 |
Beta Was this translation helpful? Give feedback.
-
就是用的那位大佬的,直接筛选后借用获取的赋值直接替换 passwall节点ip 用trojan-go 搭配cf的优选节点可以实现本地加速。我是看到你的脚本,想到能不能同样的实现替换ip。没别的意思。 |
Beta Was this translation helpful? Give feedback.
-
只用我的 CloudflareST 的话,脚本不需要这么长,几行代码最多十几行就写完了。 我前面(3L)就已经把需要的脚本核心代码都写出来了,组合起来就差不多能用了。 另外,如果以绝对路径运行 CloudflareST,那么就需要手动指定绝对路径的 |
Beta Was this translation helpful? Give feedback.
-
那位大佬的脚本,每次只能测试100个ip。是的我也只是想试试,能不能实现。可是发现我没基础,鼓捣半天也没成功 |
Beta Was this translation helpful? Give feedback.
-
我看到你的项目,确实能更少的代码就能实现,还是多谢您的帮助 |
Beta Was this translation helpful? Give feedback.
-
如果你完全没有 Shell 基础的话,那就别折腾了,我直接远程协助帮你写脚本 + 配置好,节省双方时间(相比直接教你而言)。 |
Beta Was this translation helpful? Give feedback.
-
再次感谢大佬热情执着的帮助,用大佬的脚本,简短的命令就能实现 在openwrt 定时筛选cf本地最优ip 并替换passwall的trojan-go vless ws协议的ip地址,加速。让垃圾,晚高峰获得更优速度!大佬很耐心细心!!!!再次感谢。大佬已经把脚本完善,太贴心了!!!!! |
Beta Was this translation helpful? Give feedback.
-
非常感谢,已用上 |
Beta Was this translation helpful? Give feedback.
-
likefu40,分享一下脚本? |
Beta Was this translation helpful? Give feedback.
-
@bluewyj 脚本就是 1L 的内容,我已经帮它改好了,并且已经远程协助在他的路由器上运行验证过了。 |
Beta Was this translation helpful? Give feedback.
-
请问openclash如何用? |
Beta Was this translation helpful? Give feedback.
-
中秋假期出去玩了,我节后给你。 |
Beta Was this translation helpful? Give feedback.
-
openclash要是能不停止就好了,不知道有什么办法能让这个测速脚本不走openclash |
Beta Was this translation helpful? Give feedback.
-
'''
openclash节点更新cfip脚本食用步骤: PS:如果你有多个cf节点例如s1、s2、s3、s4、s5,执行cd /root/CloudflareST && python CloudflareST_openclash.py s1 s2 s3 s4 s5 |
Beta Was this translation helpful? Give feedback.
-
那估计是openclash的bug了,只能等作者慢慢修复了,笑哭~ |
Beta Was this translation helpful? Give feedback.
-
别用这个了,直接上歇斯底里协议,udp速度很快 |
Beta Was this translation helpful? Give feedback.
-
我今年年初才从ssr换到xray,暂时不打算换了。而且hysteria不支持CDN,IP有概率被ban掉,换IP也麻烦。 |
Beta Was this translation helpful? Give feedback.
-
我想加你的微信让你协助一下,不知道怎么加。我不懂操作,现在IP每天手动扫描添加真的是太麻烦。 |
Beta Was this translation helpful? Give feedback.
-
远程也可以,不知道你什么时候有时间? |
Beta Was this translation helpful? Give feedback.
-
#!/bin/bash [[ ! -d "/paniy/cloudflare" ]] && mkdir -p /paniy/cloudflare opkg install jq arch=$(uname -m) version=$(curl -s https://api.github.com/repos/XIU2/CloudflareSpeedTest/tags | jq -r .[].name | head -1) if [[ ! -f "CloudflareST" || ${version} != ${old_version} ]]; then ##注意修改!!! ./CloudflareST -dn 10 -tll 40 -o cf_result.txt if [[ -f "cf_result.txt" ]]; then |
Beta Was this translation helpful? Give feedback.
-
CloudflareST这两天测速都是0,但脚本照样替换了PASSWALL的IP,大神有没有解决方法? |
Beta Was this translation helpful? Give feedback.
-
运行完之后出现:Command failed: Not found /etc/init.d/haproxy stop 进入 CloudflareST 目录cd /root/CloudflareST 运行 CloudflareST 测速(脚本示例中的 CloudflareST 位于 /root/CloudflareST 目录下)./CloudflareST -tll 90 获取最快 IPIP=$(sed -n "2,1p" result.csv | awk -F, '{print $1}') 判断一下是否成功获取到了最快 IP(如果没有就退出脚本):[[ -z "${IP}" ]] && echo "CloudflareST 测速结果 IP 数量为 0,跳过下面步骤..." && exit 0 修改 passwall 里对应节点的 IP(XXX 就是节点 ID)uci set passwall.xxxxxxx.address="${IP}" |
Beta Was this translation helpful? Give feedback.
-
最后重启代码 /etc/init.d/passwall restart |
Beta Was this translation helpful? Give feedback.
-
大佬这 两个SED命令 是代表什么意思能不能说下 谢谢! |
Beta Was this translation helpful? Give feedback.
-
建议大家不必用每天跑测速了,目前本人已使用openclash,meta内核可以使用grpc协议,可以找出大概尽可能快的cf-ip,让clash自动检测IP延迟来切换节点! |
Beta Was this translation helpful? Give feedback.
-
将这个脚本添加到 crontab 中定时运行即可。
# 如何获取 PassWall 节点 ID?
查看 PassWall 配置文件:
每个节点配置顶部都有一行 config nodes 'XXXXXX' ,其中 XXXXXX 就是节点 ID。
上面是我自己鼓捣的,我本人小小白没学过 linux 各种命令,
我知道我写的 shell 不对,需要检测上一个 shell 是否完成才能赋值,赋值我也不会(已经帮忙修改)。求助路过的大佬指点迷津。我就是想实现利用脚本定时筛选 IP 替换翻墙用的 IP 节点!我之前用的是 https://github.com/badafans/better-cloudflare-ip
Beta Was this translation helpful? Give feedback.
All reactions