Skip to content

Build SingBox Configs #24

Build SingBox Configs

Build SingBox Configs #24

Workflow file for this run

name: Build SingBox Config
on:
schedule:
- cron: "0 */1 * * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Build config via API
run: |
SUB=$(curl -s "https://raw.githack.com/igareck/vpn-configs-for-russia/main/Vless-Reality-White-Lists-Rus-Mobile.txt" | tr -d '\r')
CLEAN=$(echo "$SUB" | grep -E '^(vless|vmess|trojan)://' | grep -Ei 'russia' | head -n 5)
if [ -z "$CLEAN" ]; then
echo "ERROR: Нет ключей в списке"
exit 1
fi
jq -n --arg input "$CLEAN" '{
core: "singbox",
input: $input,
options: { addTun: true, addSocks: true, tunName: "singtun0", genClashSecret: false, useExtended: false, detour: false }
}' | curl -sS -X POST "https://api.web2core.workers.dev/" -H "Content-Type: application/json" --data-binary @- > config.json
- name: Commit config
run: |
git config user.name "github-actions"
git config user.email "actions@github.com"
git add config.json
git commit -m "auto update config" || exit 0
git push