全自动获取节点/订阅方法

【YouTube频道】 | 【Telegram频道】 | 【GitHub仓库】

利用大佬wzdnzd一站式代理抓取及聚合平台的这个项目在GitHubAction上实现节点自由
欢迎加入一休技术交流群讨论更多使用方法

https://yixiu520.com/p/jiedian/zidongjiedian/


使用流程如下

一、fork作者的代码仓库:GitHub - wzdnzd/aggregator: 自动签到、自动注册、订阅聚合及爬取脚本等

https://img.yixiu520.com/blog/post/zidongjiedian/img.png

二、启用Actions,如下图:

https://img.yixiu520.com/blog/post/zidongjiedian/img_1.png

三、开启必要的workflow,比如Collect,Refresh和Checkin,具体操作如下图:

https://img.yixiu520.com/blog/post/zidongjiedian/img_2.png

四、创建gist并获取到username/gist_id(记得保存,稍后要用),打开 https://gist.github.com ,随便创建一个,内容随便填,如图所示

https://img.yixiu520.com/blog/post/zidongjiedian/img_3.png
https://img.yixiu520.com/blog/post/zidongjiedian/img_4.png

五、回到 Sign in to GitHub · GitHub 点击Generate new token按钮创建 PAT。名字随便填,过期时间选得久一点,重要的是在Account permissions里授予Gists的读写权限,创建好后复制生成的token稍后用

https://img.yixiu520.com/blog/post/zidongjiedian/img_5.png
https://img.yixiu520.com/blog/post/zidongjiedian/img_6.png
https://img.yixiu520.com/blog/post/zidongjiedian/img_7.png

六、到仓库页面的Settings里设置环境变量

变量名为GIST_LINK GIST_PAT,值分别为第4和5两步获取到的内容

https://img.yixiu520.com/blog/post/zidongjiedian/img_8.png

七、手动运行测试是否能够正常执行并成功推送到gist

https://img.yixiu520.com/blog/post/zidongjiedian/img_9.png

八、添加订阅到你的翻墙软件里,添加不了的可以先订阅转换一下

https://img.yixiu520.com/blog/post/zidongjiedian/img_10.png
https://img.yixiu520.com/blog/post/zidongjiedian/img_11.png
如果你也在用,可以去给项目作者点个star,更新挺频繁,也很贴心
启用Action后如果中途你不想搞了,一定要禁用workflow或Action,

因为默认每两小时自动执行一次


 https://github.com/wzdnzd/aggregator


自动爬取网络上分享的订阅地址及代理节点,自动注册/续期、订阅转换、节点存活检查等

一键安装 Conda

# 下载 Miniconda 安装脚本 

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh 

# 添加执行权限 

chmod +x ~/miniconda.sh

# 安装 Miniconda(静默模式,自动添加到 PATH) ~/miniconda.sh -b -p $HOME/miniconda

# 将 Conda 添加到当前环境变量 echo 'export PATH="$HOME/miniconda/bin:$PATH"' >> ~/.bashrc source ~/.bashrc

# 初始化 Conda conda init


 使用方法

  1. 准备好 Python3.9 环境

  2. 下载项目代码:git clone https://github.com/wzdnzd/aggregator.git

  3. 安装依赖: pip3 install pyYAML tqdm geoip2 pycryptodomex

  4. 运行代码:终端进入项目的 aggregate 目录下执行命令 python -u subscribe/collect.py -s

等待运行结束,最终会得到 3 个文件:

  • /root/aggregator/data/clash.yaml', '/root/aggregator/data/v2ray.txt', '/root/aggregator/data/singbox.json

订阅链接在线转换:https://sub.ffq.la/

Github Action使用方法:(原始地址:https://linux.do/t/topic/96234
不建议使用,此方法容易封Github账号。。。

流程如下:

  1. fork作者的代码仓库:https://github.com/wzdnzd/aggregator

  2. 启用Actions,如下图:

d08d6c472dd5e012d5aa0989b45663ca

  1. 禁用不必要的workflow,比如Checkin和Process,具体操作如下:

2ba4548d89d43af05590affc76b6708f

  1. 创建gist并获取到username/gist_id(记得保存,稍后要用),打开 https://gist.github.com,随便创建一个,内容随便填,如图所示

image

  1. 回到 https://github.com/settings/tokens?type=beta 点击Generate new token按钮创建 PAT。名字随便填,过期时间选得久一点,重要的是在Account permissions里授予Gists的读写权限,创建好后复制生成的token稍后用

1716447115285

1716447232413

  1. 到仓库页面的Settings里设置环境变量,变量名为GIST_LINK和GIST_PAT,值分别为第4和5两步获取到的内容

d4f38a97939b31716ddafcb22fb03933

1716448445246

  1. 手动运行测试是否能够正常执行并成功推送到gist

4f8dcf7ad4708a3946b877b5635013dc

如果你看到类似以下内容,说明你跑成功了(也可以到刚刚新建的gist里查看内容)
1716461447974

  1. 添加订阅到你的翻墙软件里,添加不了的可以先订阅转换一下

c5d86e5808729e3c6214151fddadef2b

3eacfdf47992627ddfa438026e835952


转自 网络