1，在github里创建项目，例如yxip2，在项目yxip里创建文件collect_ips.py,填入以下内容import requests from bs4 import BeautifulSoup import re import os # 目标URL列表 urls = ['https://monitor.gacjie.cn/page/cloudflare/ipv4.html', 'https://ip.164746.xyz' ] # 正则表达式用于匹配IP地址 ip_pattern = r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}' # 检查ip.txt文件是否存在,如果存在则删除它 if os.path.exists('ip.txt'): os.remove('ip.txt') # 创建一个文件来存储IP地址 with open('ip.txt', 'w') as file: for url in urls: # 发送HTTP请求获取网页内容 response = requests.get(url) # 使用BeautifulSoup解析HTML soup = BeautifulSoup(response.text, 'html.parser') # 根据网站的不同结构找到包含IP地址的元素 if url == 'https://monitor.gacjie.cn/page/cloudflare/ipv4.html': elements = soup.find_all('tr') elif url == 'https://ip.164746.xyz': elements = soup.find_all('tr') else: elements = soup.find_all('li') # 遍历所有元素,查找IP地址 for element in elements: element_text = element.get_text() ip_matches = re.findall(ip_pattern, element_text) # 如果找到IP地址,则写入文件 for ip in ip_matches: file.write(ip + '\n') print('IP地址已保存到ip.txt文件中。')3，在项目yxip里创建.github/workflows/main.yml文件，填入以下内容name: Update IP List on: schedule: - cron: '*/45 * * * *' # 每45分钟更新一次 workflow_dispatch: push: jobs: update-ip-list: runs-on: ubuntu-latest permissions: contents: write # 写入权限必须保留 steps: # 关键修改点1：带token检出 - uses: actions/checkout@v3 with: token: ${{ secrets.GITHUB_TOKEN }} # 注入认证信息 fetch-depth: 0 # 获取完整提交历史 # 关键修改点2：先同步最新代码 - name: Pre-sync repository run: | git config --global user.email "tianshideyou@proton.me" git config --global user.name "tianshipapa" git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/camel52zhang/yxip.git git pull origin main # 普通拉取最新代码 - name: Set up Python uses: actions/setup-python@v4 with: python-version: '3.9' - name: Install dependencies run: | pip install requests beautifulsoup4 - name: Run script run: python ${{ github.workspace }}/collect_ips.py # 关键修改点3：智能提交逻辑 - name: Commit and push changes run: | # 检测文件变化 if [ -n "$(git status --porcelain -- ip.txt)" ]; then git add ip.txt git commit -m "Automatic update: $(date -u +'%Y-%m-%dT%H:%M:%SZ')" # 带重试的推送机制 for i in {1..3}; do git pull --rebase origin main && break || sleep 5 done git push origin HEAD:main echo "✅ 更新推送成功" else echo "🔄 未检测到IP变化" fi至此完成了从https://monitor.gacjie.cn/page/cloudflare/ipv4.html和https://ip.164746.xyz获取有些IP的目的，优选的IP保存在ip.txt文件里假如感觉45分钟执行一次太频繁，可以按以下修改schedule schedule: - cron: '3 1,13 * * *' # 每天UTC 1:03和13:03 workflow_dispatch: # 保留手动触发
第一次进入openwrt里安装的openclash进行内核更新出现以下错误：2025-04-26 14:31:16【/tmp/openclash_last_version】下载失败：【curl: (6) Could not resolve host: raw.githubusercontent.com curl: (6) Could not resolve host: raw.githubusercontent.com curl: (6) Could not resolve host: raw.githubusercontent.com】 2025-04-26 14:31:11【/tmp/clash_last_version】下载失败：【curl: (6) Could not resolve host: raw.githubusercontent.com】解决办法：1，SSH连接openwrt2，测试连通性ping raw.githubusercontent.com看到结果应该如下，这是不通的，这是因为DNS污染了ping: bad address 'raw.githubusercontent.com'3，检查hostscat /etc/hosts输出结果：127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters输出以上结果说明需要添加DNS,进入DNS查询网查询raw.githubusercontent.com对应的dns，结果选择中国的我选项的是185.199.111.1334，编辑hosts输入以下代码编辑hostsvim /etc/hosts在ff02::2 ip6-allrouters的下方输入以下内容185.199.111.133 raw.githubusercontent.com按esc，然后输入wq保存退出5，再次ping连通性ping raw.githubusercontent.com假如看到64 bytes from 185.199.111.133: seq=8 ttl=55 time=134.035 ms说明DNS污染解决以上已经解决【/tmp/openclash_last_version】下载失败的问题，再次进入Openwrt里的openclash更新插件既可正常安装了假如出现以下错误，同样的是因为DNS污染，配置hosts可以解决2025-04-26 15:12:08 错误：【文烨,Kristi,勇哥聚合-自动】下载失败，请检查网络或稍后再试... 2025-04-26 15:12:08 错误：配置文件【文烨,Kristi,勇哥聚合-自动】订阅失败，尝试不使用代理下载配置文件... 2025-04-26 15:12:08 【/tmp/yaml_sub_tmp_config.yaml】下载失败：【curl: (6) Could not resolve host: api.wcc.best curl: (6) Could not resolve host: api.wcc.best curl: (6) Could not resolve host: api.wcc.best】 2025-04-26 15:11:50 提示：配置文件【文烨,Kristi,勇哥聚合-自动】订阅的下载链接为【https://api.wcc.best/sub?target=clash&new_name=true&url=https%3A%2F%2Fsub.camelz.dpdns.org%2F110119%3Fclash&config=https%3A%2F%2Fgithub.geekery.cn%2Fraw.githubusercontent.com%2Feric52zhang%2Frouter-clash%2Frefs%2Fheads%2Fmain%2Fproxy%2Fclash-myself.ini&include=&exclude=(%3Fi)(%E5%89%A9%E4%BD%99)%7C(%E5%BC%82%E5%B8%B8)%7C(%E5%AE%98%E7%BD%91)%7C(%E5%A4%B1%E8%B4%A5)%7C(%E5%88%B0%E6%9C%9F)%7C(0.1)%7C(0.2)%7C(0.3)%7C(0.4)%7C(0.5)%7C(%E5%9F%9F%E5%90%8D)%7C(%E6%8F%90%E4%BE%9B)&emoji=false&list=false&sort=false&udp=true&scv=false&append_type=false&fdn=true】... 2025-04-26 15:11:50 提示：配置文件【文烨,Kristi,勇哥聚合-自动】订阅的 User-Agent 为【clash.meta】... 2025-04-26 15:11:50 开始更新配置文件【文烨,Kristi,勇哥聚合-自动】... 2025-04-26 15:11:49 错误：【文烨,Kristi,勇哥聚合-自动】下载失败，请检查网络或稍后再试... 2025-04-26 15:11:49 错误：配置文件【文烨,Kristi,勇哥聚合-自动】订阅失败，尝试不使用代理下载配置文件... 2025-04-26 15:11:49 【/tmp/yaml_sub_tmp_config.yaml】下载失败：【curl: (6) Could not resolve host: api.wcc.best curl: (6) Could not resolve host: api.wcc.best curl: (6) Could not resolve host: api.wcc.best】 2025-04-26 15:11:31 提示：配置文件【文烨,Kristi,勇哥聚合-自动】订阅的下载链接为【https://api.wcc.best/sub?target=clash&new_name=true&url=https%3A%2F%2Fsub.camelz.dpdns.org%2F110119%3Fclash&config=https%3A%2F%2Fgithub.geekery.cn%2Fraw.githubusercontent.com%2Feric52zhang%2Frouter-clash%2Frefs%2Fheads%2Fmain%2Fproxy%2Fclash-myself.ini&include=&exclude=(%3Fi)(%E5%89%A9%E4%BD%99)%7C(%E5%BC%82%E5%B8%B8)%7C(%E5%AE%98%E7%BD%91)%7C(%E5%A4%B1%E8%B4%A5)%7C(%E5%88%B0%E6%9C%9F)%7C(0.1)%7C(0.2)%7C(0.3)%7C(0.4)%7C(0.5)%7C(%E5%9F%9F%E5%90%8D)%7C(%E6%8F%90%E4%BE%9B)&emoji=false&list=false&sort=false&udp=true&scv=false&append_type=false&fdn=true】... 2025-04-26 15:11:31 提示：配置文件【文烨,Kristi,勇哥聚合-自动】订阅的 User-Agent 为【clash.meta】... 2025-04-26 15:11:31 开始更新配置文件【文烨,Kristi,勇哥聚合-自动】...配置后的hosts127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters 185.199.111.133 raw.githubusercontent.com 104.21.80.1 api.wcc.best其他错误假如如下错误2025-04-26 16:38:06 【/tmp/yaml_sub_tmp_config.yaml】下载失败：【curl: (28) Failed to connect to api.wcc.best port 443 after 30002 ms: Error curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to api.wcc.best:443 】是因为订阅转换的问题，改一下订阅装换既可解决，假如不能，测试自建订阅装换地址，参考教程自建地址：http://192.168.5.168:25500/sub
github解决ssh:connect to host github.com port 22:Connection refused
执行以下命令hexo cl && hexo generate && hexo server假如报以下错误：warning: in the working copy of 'tags/飞牛/index.html', LF will be replaced by CRLF the next time Git touches it On branch master nothing to commit, working tree clean ssh: connect to host github.com port 22: Connection refused fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html Error: Spawn failed at ChildProcess.<anonymous> (D:\blog\lele\node_modules\hexo-deployer-git\node_modules\hexo-util\lib\spawn.js:51:21) at ChildProcess.emit (node:events:524:28) at cp.emit (D:\blog\lele\node_modules\cross-spawn\lib\enoent.js:34:29) at ChildProcess._handle.onexit (node:internal/child_process:293:12)注意上边ssh: connect to host github.com port 22: Connection refused这个错误，然后执行下边的命令ssh -vT git@github.com假如输出：$ ssh -vT git@github.com OpenSSH_9.0p1, OpenSSL 1.1.1o 3 May 2022 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Connecting to github.com [::1] port 22. debug1: connect to address ::1 port 22: Connection refused debug1: Connecting to github.com [127.0.0.1] port 22. debug1: connect to address 127.0.0.1 port 22: Connection refused ssh: connect to host github.com port 22: Connection refused从上面的信息马上就发现了诡异的地方，连接http://github.com的地址居然是::1和127.0.0.1。前者是IPV6的localhost地址，后者是IPV4的localhost地址，这说明错误的原因是DNS解析被污染了，修改windows的host文件即可解决，host文件路径在C:\Windows\System32\drivers\etc，进去找到host用记事本打开，添加github对应的dns即可解决 20.205.243.166 github.comgithub对应的dns可以去下边这个网站去找https://dnschecker.org/修改后保存，再允许下边代码可解决hexo cl && hexo generate && hexo server参考教程{% link 解决ssh: connect to host github.com port 22: Connection refused, https://www.cnblogs.com/Archer314/p/14641310.html, /img/niu.webp %}
群晖docker安装1panel教程并配置mysql和openresty，并用docker compose安装Typecho
用docker安装安装1panel教程并配置mysql和openresty1,确保群晖已经安装docker2，安装 1Panel选的官方的ssh安装方式，使用SSH工具登录，确保root登录，假如不是，在命令行输入sudo -i然后拷贝下边命令安装并运行1panelcurl -sSL https://resource.fit2cloud.com/1panel/package/quick_start.sh -o quick_start.sh && sh quick_start.sh3，登录1panel安装成功后，控制台会打印面板访问信息，可通过浏览器访问 1Panel：http://目标服务器 IP 地址:目标端口/安全入口执行 1pctl user-info 命令可获取安全入口（entrance）1panel user-info官方地址：https://1panel.cn/docs/installation/online_installation/4，登录1panel配置mysql先创建mysql的docker-compose.yml在电脑本地创建docker-compose.yml，填入以下内容，保存networks: 1panel-network: external: true services: mysql: command: - --mysql-native-password=on container_name: ${CONTAINER_NAME} deploy: resources: limits: cpus: ${CPUS} memory: ${MEMORY_LIMIT} environment: MYSQL_ROOT_PASSWORD: ${PANEL_DB_ROOT_PASSWORD} # MySQL root 密码 TZ: Asia/Shanghai # 时区设置（直接合并到这里） image: mysql:8.4.5 labels: createdBy: Apps networks: - 1panel-network ports: - ${HOST_IP}:${PANEL_APP_PORT_HTTP}:3306 restart: always volumes: - /volume1/docker/1panel/1panel/apps/mysql/mysql/data/:/var/lib/mysql - /volume1/docker/1panel/1panel/apps/mysql/mysql/conf/my.cnf:/etc/my.cnf - /volume1/docker/1panel/1panel/apps/mysql/mysql/log:/var/log/mysql 进入群晖的docker/1panel/1panel/apps/文件夹，创建mysql/mysql/data文件夹，创建mysql/mysql/conf/my.cnf文件，创建mysql/mysql/log文件，并在/volume1/docker/1panel/1panel/apps/mysql/mysql文件夹并上传刚刚创建的docker-compose.yml选择左侧菜单「容器」->「编排」>「创建编排」，来源那里选择路径选择，输入docker-compose.yml的路径/volume1/docker/1panel/1panel/apps/mysql/mysql/docker-compose.yml 内容，点击“确认”按钮等待部署完成即可。参考地址：https://blog.irec.moe/install_1panel_with_synology_docker.html5，配置openresty方法类似mysqldocker-compose.ymlservices: openresty: image: 1panel/openresty:1.21.4.3-3-3-focal container_name: ${CONTAINER_NAME} restart: always network_mode: host volumes: - /volume1/docker/1panel/1panel/apps/openresty/openresty/conf/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf - /volume1/docker/1panel/1panel/apps/openresty/openresty/conf/fastcgi_params:/usr/local/openresty/nginx/conf/fastcgi_params - /volume1/docker/1panel/1panel/apps/openresty/openresty/conf/fastcgi-php.conf:/usr/local/openresty/nginx/conf/fastcgi-php.conf - /volume1/docker/1panel/1panel/apps/openresty/openresty/conf/mime.types:/usr/local/openresty/nginx/conf/mime.types - /volume1/docker/1panel/1panel/apps/openresty/openresty/logs/nginx:/var/log/nginx - /volume1/docker/1panel/1panel/apps/openresty/openresty/conf/conf.d:/usr/local/openresty/nginx/conf/conf.d/ - /volume1/docker/1panel/1panel/apps/openresty/openresty/www:/www - /volume1/docker/1panel/1panel/apps/openresty/openresty/root:/usr/share/nginx/html - /volume1/docker/1panel/1panel/apps/openresty/openresty/1pwaf/data:/usr/local/openresty/1pwaf/data environment: TZ: Asia/Shanghai labels: createdBy: "Apps"用docker安装Typecho方式1：使用 docker run$ docker run --name typecho-server -e TYPECHO_SITE_URL=https://your-domain.com -d joyqi/typecho:nightly-php7.4-apache方式2：使用 docker composeversion: '3.7' services: typecho: image: joyqi/typecho:nightly-php7.4-apache container_name: typecho-server restart: always environment: - TYPECHO_SITE_URL=https://your-domain.com ports: - 8080:80 volumes: - /var/typecho:/app/usr1,替换 your-domain.com 为你的域名。2,Port 8080 只是示例端口，修改为你需要映射的端口3,/var/typecho 是你的 Typecho 数据目录，你可以使用任何你喜欢的目录，但请确保目录存在且可写。官方文档：https://docs.typecho.re/usage/install/docker.html注意：需要配置数据库，可以在1panel里的my-sql里配置你的数量库，数据库地址是：yourIP地址(docker宿主的ip地址):3306,用户名和密码是你设置的
1,创建certimate的data文件需要挂载的文件夹我喜欢创建在docker目录下，进入docker文件，新增certimate文件夹，进入certimate文件夹，新增data文件夹2，创建docker-compose.yml在电脑本地创建docker-compose.yml，填入以下内容，保存version: "3.0" services: certimate: image: usual2970/certimate:latest container_name: certimate_server ports: - 8090:8090 volumes: - /volume1/docker/certimate/data:/app/pb_data # 这里挂载的是刚刚创建的绝对路径/volume1/docker/certimate/data environment: TZ: Asia/Shanghai # 时区设置，这点要非常注意，一定要这样填，不然会报错 restart: unless-stopped进入群晖的certimate文件夹，上传刚刚创建的docker-compose.yml3，登录 1Panel，选择左侧菜单「容器」->「编排」>「创建编排」，来源那里选择路径选择，输入docker-compose.yml的路径/volume1/docker/certimate/docker-compose.yml 内容，点击“确认”按钮等待部署完成即可。4，登录并修改用户名和密码登录地址是：http://你的IP地址:8090默认用户名/密码：admin@certimate.fun/1234567890官网地址：https://github.com/usual2970/certimatehttps://docs.certimate.me/
Microsoft Activation Scripts (MAS)开源 Windows 和 Office 激活器，具有 HWID、Ohook、TSforge、KMS38 和在线 KMS 激活方法以及高级故障排除功能。下载/如何使用？方法 1 - PowerShell (Windows 8 and later)打开 PowerShell (不是 CMD). 右键单击 Windows 开始菜单，然后选择“PowerShell”或“终端”。.进入PowerShell后复制粘贴以下代码后回车irm https://get.activated.win | iex或者使用以下代码irm https://massgrave.dev/get | iex回车后你将看到激活选项，选 (1) HWID是Windows激活，选(2) Ohook是office激活.选择后等搞定.方法 2 - Traditional (Windows 7 and later)使用下面提供的链接下载文件. https://github.com/massgravel/Microsoft-Activation-Scripts/archive/refs/heads/master.zip 或 https://git.activated.win/massgrave/Microsoft-Activation-Scripts/archive/master.zip或（ ❤️me的保存地址）https://wwym.lanzouq.com/i038w2tkpg6j右键单击下载的 zip 文件并解压在解压的文件夹中，找到名为 All-In-One-Version的文件运行文件名为 MAS_AIO.cmd运行后你将看到激活选项，按屏幕闪的说明操作.搞定.如果您无法使用 PowerShell 方法启动 MAS，请参考上面列出的方法 2如果启动了 MAS 并且脚本显示任何错误，请检查蓝色提到的任何故障排除步骤并尝试遵循这些步骤。要在无人值守模式下运行脚本，请检查此处。Latest Version: 3.0 Release date: 14-Feb-2025大佬地址：https://massgrave.dev/https://github.com/massgravel/Microsoft-Activation-Scripts也可以用TSforge，大佬地址：https://github.com/massgravel/TSforge下载地址（ ❤️me的保存地址）https://wwym.lanzouq.com/iatD22tkpqng
利用BPB Panel 部署Cloudflare Workers 或 Pages 的代理面板项目，可以轻松建立免费 VPN，因CF对代理项目审查较严格，所以需要需要对源码进行自定义加密混淆，生成不同的混淆代码，绕过CF的限制。方法一准备工作Github帐号；cloudflare账号；域名（收费或免费域名）Github部署新建github仓库:把BPB panel项目代码同步到仓库。配置github Actions: 在仓库目录下创建.github/workflows文件夹，并创建Obfuscate.yml文件。name: Build Obfuscate BPB worker # 工作流名称：构建并混淆BPB worker on: push: branches: - main # 当main分支有push时触发 schedule: - cron: '3 1,13 * * *' # 每天UTC时间1:03和13:03自动运行（北京时间9:03和21:03） workflow_dispatch: # 保留手动触发按钮 permissions: contents: write # 授予写入仓库内容的权限（用于后续git push） jobs: build: runs-on: ubuntu-latest # 使用最新版Ubuntu系统作为运行环境 steps: # 第一步：检出代码 - name: Check out the code uses: actions/checkout@v4 with: fetch-depth: 0 # 获取完整git历史记录（用于后续git diff比较） # 第二步：设置Node.js环境 - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: "latest" # 使用最新版Node.js # 第三步：安装依赖 - name: Install dependencies run: | npm install -g javascript-obfuscator # 全局安装JS混淆工具 sudo apt-get install -y unzip curl # 安装解压工具和curl（用于下载文件） # 第四步：下载最新worker并处理 - name: Download and extract latest BPB worker run: | # 通过GitHub API获取最新版worker.zip的下载链接 LATEST_URL=$(curl -s https://api.github.com/repos/bia-pain-bache/BPB-Worker-Panel/releases/latest | grep "browser_download_url.*worker.zip" | cut -d '"' -f 4) # 下载文件并保存为worker.zip wget "$LATEST_URL" -O worker.zip # 解压并将内容直接输出到origin.js（不依赖原文件名） unzip -p worker.zip > origin.js # 使用javascript-obfuscator混淆代码 javascript-obfuscator origin.js --output _worker.js \ --compact true \ # 压缩代码 --identifier-names-generator hexadecimal \ # 变量名转为16进制 --rename-globals true \ # 重命名全局变量 --string-array true \ # 加密字符串 --string-array-encoding 'base64' \ # 使用base64编码 --string-array-threshold 0.75 \ # 75%以上的字符串会被加密 --transform-object-keys true \ # 混淆对象键名 --self-defending false \ # 关闭反调试（可根据需要开启） --simplify true # 简化代码逻辑 # 第五步：提交变更 - name: Commit and push changes run: | # 配置git用户信息（使用GitHub Actions的机器人账号） git config --global user.name "github-actions[bot]" git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" # 添加要提交的文件 git add origin.js _worker.js # 检查文件是否有变化 if git diff-index --quiet HEAD --; then echo "没有检测到文件变化，跳过提交" else # 提交变更（包含时间戳） git commit -m ":arrow_up: 自动更新worker文件 [$(date +'%Y-%m-%d %H:%M:%S')]" # 同步远程变更（避免冲突） git pull --rebase origin main # 推送变更到main分支 git push origin main fiGithub仓库通过Obfuscate.yml自动下载BPB源代码，并执行混淆。假如失效，可以进入BPB panel大佬项目地址重新更新download地址Cloudflare 部署•创建pages：点击workers和pages，选择pages部署。连接github仓库，选择新建的项目仓库，然后点击部署。•绑定自定义域名：以防止page分配的域名被屏蔽。•设置变量：UUID：使用UUID在线生成器PROXY_IP：从随机代理ip站点获取TR_PASS：随便写个密码•绑定KV命名空间：名称随便但不能含有bpb等敏感词，绑定的是小写kv•重试部署pagesBPB面板设置•部署成功后，打开浏览器输入:https://[自定义域名]或者你的项目地址,后面加上/panel检查是否能正常访问BPB面板.•修改BPB面板密码•配置BPB面板参数常用IP获取方式cleanIP/优选IP：地址1 地址2 地址3 优选域名PROXYIP：点击进入1 点击进入2优选域名本地优选ip windows版，下载地址节点测试在V2rayN上使用演示Proxy IPs / Domains 获取地址：这里参考大佬视频教程和文字教程方法二（也是自己在用，自带混淆以后也可套用这个）在根目录创建项目，然后添加.github/workflows/Obfuscate.yml文件，输入以下代码name: Build Obfuscate my_tro on: push: branches: - main schedule: - cron: "0 3 * * *" # 每天凌晨3点自动运行 workflow_dispatch: # 支持手动运行 permissions: contents: write jobs: build: runs-on: ubuntu-latest steps: - name: Check out the code uses: actions/checkout@v4 - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: "latest" - name: Install dependencies run: | npm install -g javascript-obfuscator sudo apt-get install -y unzip - name: Download and extract latest my_tro worker run: | wget https://raw.githubusercontent.com/camel52zhang/my_tro/refs/heads/main/_worker.js mv _worker.js origin.js - name: Clean existing obfuscated files # 新增清理步骤 run: | rm -f _worker.js* - name: Obfuscate my_tro worker js run: | javascript-obfuscator origin.js --output _worker.js \ --compact true \ --identifier-names-generator hexadecimal \ --rename-globals true \ --string-array true \ --string-array-encoding 'base64' \ --string-array-threshold 0.75 \ --transform-object-keys true \ --self-defending false \ --simplify true - name: 提交更改 uses: stefanzweifel/git-auto-commit-action@v5 with: branch: main commit_message: ':arrow_up: update latest my_tro' commit_author: 'github-actions[bot] <github-actions[bot]@users.noreply.github.com>' push_options: '--set-upstream'方法三在根目录创建项目，然后添加.github/workflows/update-worker.yml文件，输入以下代码name: Auto Update Worker on: push: branches: - main schedule: - cron: '3 1,13 * * *' # 每天 UTC 时间 1:03 和 13:03 自动运行（北京时间 9:03 和 21:03） workflow_dispatch: # 支持手动运行 permissions: contents: write jobs: update: runs-on: ubuntu-latest steps: - name: 初始化仓库 uses: actions/checkout@v4 - name: 获取当前本地版本 id: get_local_version run: | echo -e "\033[34m[获取本地版本]\033[0m" if [ -f version.txt ]; then LOCAL_VERSION=$(cat version.txt) echo "当前本地版本: $LOCAL_VERSION" else echo "首次同步，没有本地版本。" LOCAL_VERSION="" fi echo "LOCAL_VERSION=$LOCAL_VERSION" >> $GITHUB_ENV - name: 获取最新 Release 信息 id: get_release run: | echo -e "\033[34m[获取最新 Release]\033[0m" API_URL="https://api.github.com/repos/bia-pain-bache/BPB-Worker-Panel/releases" RESPONSE=$(curl -s "$API_URL") LATEST_RELEASE=$(echo "$RESPONSE" | jq -r '.[0]') TAG_NAME=$(echo "$LATEST_RELEASE" | jq -r '.tag_name') DOWNLOAD_URL=$(echo "$LATEST_RELEASE" | jq -r '.assets[] | select(.name == "worker.zip") | .browser_download_url') if [ -z "$DOWNLOAD_URL" ] || [ "$DOWNLOAD_URL" == "null" ]; then echo -e "\033[31m未找到 worker.zip，退出！\033[0m" exit 1 fi echo "最新版本号: $TAG_NAME" echo "DOWNLOAD_URL=$DOWNLOAD_URL" >> $GITHUB_ENV echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV - name: 判断是否需要更新 id: check_update run: | echo -e "\033[34m[判断是否需要更新]\033[0m" if [ "$LOCAL_VERSION" = "$TAG_NAME" ]; then echo -e "\033[32m已经是最新版本，无需更新。\033[0m" echo "UPDATE_NEEDED=false" >> $GITHUB_ENV else echo -e "\033[33m发现新版本，需要更新！\033[0m" echo "UPDATE_NEEDED=true" >> $GITHUB_ENV fi - name: 如果需要，清理旧文件并下载新版本 if: env.UPDATE_NEEDED == 'true' run: | echo -e "\033[34m[清理旧文件]\033[0m" rm -rf ./* echo -e "\033[34m[下载最新 worker.zip]\033[0m" wget -O worker.zip "$DOWNLOAD_URL" echo -e "\033[34m[解压 worker.zip]\033[0m" unzip worker.zip echo -e "\033[34m[删除 worker.zip]\033[0m" rm worker.zip echo -e "\033[34m[记录新版本号]\033[0m" echo "$TAG_NAME" > version.txt - name: 提交更改 if: env.UPDATE_NEEDED == 'true' uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "🔄 自动同步最新 Worker 版本：${{ env.TAG_NAME }}" commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>" push_options: --force方法四：这种方式适用那些只是抓取文件，利润_worker.js，然后去混淆的项目同样的在根目录创建项目，然后添加.github/workflows/Obfuscate.yml文件，输入以下代码name: Build Obfuscate cmliu_edge on: push: branches: - main # 主分支推送时触发 schedule: - cron: "0 3 * * *" # 每天凌晨3点自动运行 workflow_dispatch: # 支持在GitHub网页手动触发工作流 permissions: contents: write # 授予工作流写入仓库的权限 jobs: build: runs-on: ubuntu-latest # 使用最新版Ubuntu系统 steps: # 步骤1：检出仓库代码 - name: Check out the code uses: actions/checkout@v4 # 步骤2：设置Node.js环境 - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: "latest" # 步骤3：安装所需依赖 - name: Install dependencies run: | npm install -g javascript-obfuscator sudo apt-get install -y unzip # 步骤4：清理旧文件 - name: Clean existing obfuscated files run: | rm -f _worker.js* origin.js # 步骤5：下载最新worker脚本_worker.js重命名为origin.js - name: Download latest cmliu_edge worker run: | wget https://raw.githubusercontent.com/cmliu/edgetunnel/refs/heads/main/_worker.js -O origin.js # 步骤6：执行JavaScript混淆 - name: Obfuscate JavaScript run: | javascript-obfuscator origin.js --output _worker.js \ --compact true \ --identifier-names-generator hexadecimal \ --rename-globals true \ --string-array true \ --string-array-encoding 'base64' \ --string-array-threshold 0.75 \ --transform-object-keys true \ --self-defending false \ --simplify true # 步骤7：检查文件变更 - name: Check file changes id: changes run: | if git diff --quiet --exit-code _worker.js; then echo "has_changes=false" >> $GITHUB_OUTPUT else echo "has_changes=true" >> $GITHUB_OUTPUT echo "Changes detected in _worker.js" fi # 步骤8：条件提交变更 - name: Commit and push changes if: ${{ steps.changes.outputs.has_changes == 'true' }} uses: stefanzweifel/git-auto-commit-action@v5 with: branch: main commit_message: ':arrow_up: update latest cmliu_edge' commit_author: 'github-actions[bot] <github-actions[bot]@users.noreply.github.com>' file_pattern: _worker.js 参考教程：https://www.kekehub.com/2025/09/bpbnat.html
首先你需要有一个谷歌账号，没有账号的小伙伴可以自行去申请一个，方法很简单！作者GitHub仓库地址：点此打开谷歌colab：点此打开1、具体操作详见YouTube视频教程打开 谷歌colab 新建笔记本，输入如下代码：拉取GitHub仓库!git clone https://github.com/wzdnzd/aggregator.git进入仓库目录%cd aggregator安装Python!pip install -r requirements.txt运行 process.py 脚本!python -u subscribe/collect.py -s下载节点from google.colab import files files.download('填写你的节点路径')例如：from google.colab import files files.download('/content/aggregator/data/clash.yaml') 或 from google.colab import files files.download('/content/aggregator/data/v2ray.txt')你的节点路径如下截图参考大佬教程