Skip to main content

blog

  1. pkg install -y wget
    pkg install -y gawk
    pkg install -y screen
    pkg install -y resolv-conf
    pkg install -y ca-certificates
    pkg install -y proot
    mkdir ~/gost && cd ~/gost
    REPO="go-gost/gost"
    API_URL="https://api.github.com/repos/$REPO/releases"
    response=$(curl -s "$API_URL")
    download_link=$(echo "$response" | grep "linux_arm64" | cut -d'"' -f 4 | head -n 2 | tail -n 1)
    package_name=$(echo "$response" | grep "linux_arm64" | cut -d'"' -f 4 | head -n 1)
    wget "$download_link"
    tar zxvf "$package_name"
    rm -f "$package_name" README* LICENSE*
    cd . > config.yaml
    echo 'services:' >> config.yaml
    echo '  - name: service-0' >> config.yaml
    echo '    addr: ":10808"' >> config.yaml
    echo '    resolver: resolver-0' >> config.yaml
    echo '    handler:' >> config.yaml
    echo '      type: socks5' >> config.yaml
    echo '      metadata:' >> config.yaml
    echo '        udp: true' >> config.yaml
    echo '        udpbuffersize: 4096' >> config.yaml
    echo '    listener:' >> config.yaml
    echo '      type: tcp' >> config.yaml
    echo 'resolvers:' >> config.yaml
    echo '  - name: resolver-0' >> config.yaml
    echo '    nameservers:' >> config.yaml
    echo '      - addr: https://dns.google/dns-query' >> config.yaml
    echo '        prefer: ipv6' >> config.yaml
    echo '        ttl: 5m0s' >> config.yaml
    echo '        async: true' >> config.yaml
    cd /data/data/com.termux/files/usr/etc/profile.d
    cd . > gost.sh
    echo '#!/data/data/com.termux/files/usr/bin/bash' >> gost.sh
    echo 'screen -wipe' >> gost.sh
    echo "screen -ls | grep Detached | cut -d. -f1 | awk '{print $1}' | xargs kill" >> gost.sh
    echo "screen -dmS myscreen bash -c 'cd ~/gost && proot -b $PREFIX/etc/resolv.conf:/etc/resolv.conf -b $PREFIX/etc/tls/cert.pem:/etc/ssl/certs/ca-certificates.crt ./gost -C config.yaml'" >> gost.sh
    chmod +x gost.sh
    exit
  2. "tag": "netflix",
    "type": "remote",
    "format": "binary",
    "url": "https://github.com/lyc8503/sing-box-rules/raw/rule-set-geosite/geosite-netflix.srs",
    "download_detour": "⚡️ 自动选择",
    "update_interval": "7d"
    },
    {
    "tag": "hulu",
    "type": "remote",
    "format": "binary",
    "url": "https://github.com/lyc8503/sing-box-rules/raw/rule-set-geosite/geosite-hulu.srs",
    "download_detour": "⚡️ 自动选择",
    "update_interval": "7d"
    },
    {
    "tag": "disney",
    "type": "remote",
    "format": "binary",
    "url": "https://github.com/lyc8503/sing-box-rules/raw/rule-set-geosite/geosite-disney.srs",
    "download_detour": "⚡️ 自动选择",
    "update_interval": "7d"
    },
    {
    "tag": "hbo",
    "type": "remote",
    "format": "binary",
    "url": "https://github.com/lyc8503/sing-box-rules/raw/rule-set-geosite/geosite-hbo.srs",
    "download_detour": "⚡️ 自动选择",
    "update_interval": "7d"
    },
    {
    "tag": "amazon",
    "type": "remote",
    "format": "binary",
    "url": "https://github.com/lyc8503/sing-box-rules/raw/rule-set-geosite/geosite-amazon.srs",
    "download_detour": "⚡️ 自动选择",
    "update_interval": "7d"
    },
    {
    "tag": "bahamut",
    "type": "remote",
    "format": "binary",
    "url": "https://github.com/lyc8503/sing-box-rules/raw/rule-set-geosite/geosite-bahamut.srs",
    "download_detour": "⚡️ 自动选择",
    "update_interval": "7d"
    },
    {
    "tag": "geolocation-!cn",
    "type": "remote",
    "format": "binary",
    "url": "https://github.com/lyc8503/sing-box-rules/raw/rule-set-geosite/geosite-geolocation-!cn.srs",
    "download_detour": "⚡️ 自动选择",
    "update_interval": "7d"
    },
    {
    "tag": "telegram-ip",
    "type": "remote",
    "format": "binary",
    "url": "https://github.com/lyc8503/sing-box-rules/raw/rule-set-geoip/geoip-telegram.srs",
    "download_detour": "⚡️ 自动选择",
    "update_interval": "7d"
    }
    ],
    "rules": [
    {
    "protocol": "dns",
    "outbound": "dns-out"
    },
    {
    "inbound": "dns-in",
    "outbound": "dns-out"
    },
    {
    "clash_mode": "direct",
    "outbound": "DIRECT"
    },
    {
    "clash_mode": "global",
    "outbound": "GLOBAL"
    },
    {
    "rule_set": [
    "category-ads-all"
    ],
    "outbound": "🛑 广告拦截"
    },
    {
    "rule_set": [
    "openai",
    "anthropic",
    "jetbrains-ai",
    "perplexity"
    ],
    "outbound": "💬 AI 服务"
    },
    {
    "rule_set": [
    "telegram-ip"
    ],
    "outbound": "📲 电报消息"
    },
    {
    "rule_set": [
    "github",
    "gitlab"
    ],
    "outbound": "🐱 Github"
    },
    {
    "rule_set": [
    "youtube1"
    ],
    "outbound": "DIRECT"
    },
    {
    "rule_set": [
    "netflix",
    "hulu",
    "disney",
    "hbo",
    "amazon",
    "bahamut"
    ],
    "outbound": "🎬 流媒体"
    }
    ],
    "auto_detect_interface": true,
    "final": "🐟 漏网之鱼",
    "default_mark": 1
    },
    "experimental": {
    "clash_api": {
    "external_controller": "0.0.0.0:9090",
    "external_ui": "/usr/local/etc/sing-box/ui",
    "secret": "",
    "default_mode": "rule"
    },
    "cache_file": {
    "enabled": true,
    "path": "/usr/local/etc/sing-box/cache.db",
    "cache_id": "my_profile1",
    "store_fakeip": true
    }
    }
    }
  3. "🇭🇰 香港",
    "🇹🇼 台湾",
    "🇰🇷 arm-tailscale",
    "🇰🇷 arm1",
    "🇺🇸 Racknerd",
    "🇭🇰 CAC 香港 01",
    "🇨🇦 CAC 加拿大 01",
    "🇩🇪 CAC 德国 01",
    "🇺🇸 CAC 美国 01",
    "🇯🇵 CAC 日本 01"
    ]
    },
    {
    "type": "selector",
    "tag": "🐱 Github",
    "outbounds": [
    "🚀 节点选择",
    "DIRECT",
    "REJECT",
    "⚡️ 自动选择",
    "香港 - LUMEN",
    "🇭🇰 CAC 香港 02",
    "HKG",
    "🇵🇱 波兰",
    "🇯🇵 Gcore",
    "🇯🇵 日本",
    "🇸🇬 新加坡",
    "🇭🇰 香港",
    "🇹🇼 台湾",
    "🇰🇷 arm-tailscale",
    "🇰🇷 arm1",
    "🇺🇸 Racknerd",
    "🇭🇰 CAC 香港 01",
    "🇨🇦 CAC 加拿大 01",
    "🇩🇪 CAC 德国 01",
    "🇺🇸 CAC 美国 01",
    "🇯🇵 CAC 日本 01"
    ]
    },
    {
    "type": "selector",
    "tag": "🎬 流媒体",
    "outbounds": [
    "🚀 节点选择",
    "DIRECT",
    "REJECT",
    "⚡️ 自动选择",
    "香港 - LUMEN",
    "🇭🇰 CAC 香港 02",
    "HKG",
    "🇵🇱 波兰",
    "🇯🇵 Gcore",
    "🇯🇵 日本",
    "🇸🇬 新加坡",
    "🇭🇰 香港",
    "🇹🇼 台湾",
    "🇰🇷 arm-tailscale",
    "🇰🇷 arm1",
    "🇺🇸 Racknerd",
    "🇭🇰 CAC 香港 01",
    "🇨🇦 CAC 加拿大 01",
    "🇩🇪 CAC 德国 01",
    "🇺🇸 CAC 美国 01",
    "🇯🇵 CAC 日本 01"
    ]
    },
    {
    "type": "selector",
    "tag": "🐟 漏网之鱼",
    "outbounds": [
    "🚀 节点选择",
    "DIRECT",
    "REJECT",
    "⚡️ 自动选择",
    "香港 - LUMEN",
    "🇭🇰 CAC 香港 02",
    "HKG",
    "🇵🇱 波兰",
    "🇯🇵 Gcore",
    "🇯🇵 日本",
    "🇸🇬 新加坡",
    "🇭🇰 香港",
    "🇹🇼 台湾",
    "🇰🇷 arm-tailscale",
    "🇰🇷 arm1",
    "🇺🇸 Racknerd",
    "🇭🇰 CAC 香港 01",
    "🇨🇦 CAC 加拿大 01",
    "🇩🇪 CAC 德国 01",
    "🇺🇸 CAC 美国 01",
    "🇯🇵 CAC 日本 01"
    ]
    },
    {
    "type": "selector",
    "tag": "🛑 广告拦截",
    "outbounds": [
    "DIRECT",
    "REJECT"
    ]
    }
    ],
    "route": {
    "rule_set": [
    {
    "tag": "category-ads-all",
    "type": "remote",
    "format": "binary",
    "url": "https://github.com/lyc8503/sing-box-rules/raw/rule-set-geosite/geosite-category-ads-all.srs",
    "download_detour": "⚡️ 自动选择",
    "update_interval": "7d"
    },
    {
    "tag": "openai",
    "type": "remote",
    "format": "binary",
    "url": "https://github.com/lyc8503/sing-box-rules/raw/rule-set-geosite/geosite-openai.srs",
    "download_detour": "⚡️ 自动选择",
    "update_interval": "7d"
    },
    {
    "tag": "anthropic",
    "type": "remote",
    "format": "binary",
    "url": "https://github.com/lyc8503/sing-box-rules/raw/rule-set-geosite/geosite-anthropic.srs",
    "download_detour": "⚡️ 自动选择",
    "update_interval": "7d"
    },
    {
    "tag": "jetbrains-ai",
    "type": "remote",
    "format": "binary",
    "url": "https://github.com/lyc8503/sing-box-rules/raw/rule-set-geosite/geosite-jetbrains-ai.srs",
    "download_detour": "⚡️ 自动选择",
    "update_interval": "7d"
    },
    {
    "tag": "perplexity",
    "type": "remote",
    "format": "binary",
    "url": "https://github.com/lyc8503/sing-box-rules/raw/rule-set-geosite/geosite-perplexity.srs",
    "download_detour": "⚡️ 自动选择",
    "update_interval": "7d"
    },
    {
    "tag": "youtube1",
    "type": "remote",
    "format": "binary",
    "url": "https://github.com/zxy2012/youtube/raw/refs/heads/main/v6.srs",
    "download_detour": "⚡️ 自动选择"
    },
    {
    "tag": "github",
    "type": "remote",
    "format": "binary",
    "url": "https://github.com/lyc8503/sing-box-rules/raw/rule-set-geosite/geosite-github.srs",
    "download_detour": "⚡️ 自动选择",
    "update_interval": "7d"
    },
    {
    "tag": "gitlab",
    "type": "remote",
    "format": "binary",
    "url": "https://github.com/lyc8503/sing-box-rules/raw/rule-set-geosite/geosite-gitlab.srs",
    "download_detour": "⚡️ 自动选择",
    "update_interval": "7d"
    },
    {
  4. {
    "dns": {
    "servers": [
    {
    "tag": "ytbv",
    "address": "https://sandbox.opendns.com/dns-query",
    "client_subnet": "2a04:fa87:fffd::c000:42a8",
    "address_resolver": "onedns",
    "strategy": "ipv6_only",
    "detour": "DIRECT"
    },
    {
    "tag": "onedns",
    "address": "tls://223.5.5.5:853",
    "detour": "DIRECT"
    },
    {
    "tag": "dns_refused",
    "address": "rcode://refused"
    },
    {
    "tag": "fakeipDNS",
    "address": "fakeip",
    "strategy": "ipv4_only"
    }
    ],
    "rules": [
    {
    "outbound": "any",
    "server": "onedns"
    },
    {
    "rule_set": [
    "youtube1"
    ],
    "server": "ytbv"
    },
    {
    "inbound": "dns-in",
    "server": "fakeipDNS",
    "disable_cache": true,
    "rewrite_ttl": 1
    }
    ],
    "fakeip": {
    "enabled": true,
    "inet4_range": "198.18.0.0/15",
    "inet6_range": "f2b0::/18"
    },
    "independent_cache": true
    },
    "ntp": {
    "enabled": true,
    "server": "time.apple.com",
    "server_port": 123,
    "interval": "30m",
    "detour": "DIRECT"
    },
    "inbounds": [
    {
    "type": "socks",
    "listen": "::",
    "listen_port": 7891
    },
    {
    "type": "direct",
    "tag": "dns-in",
    "listen": "::",
    "listen_port": 5353
    },
    {
    "type": "tproxy",
    "tag": "tproxy-in",
    "listen": "::",
    "listen_port": 7896,
    "tcp_fast_open": true,
    "sniff": true,
    "sniff_override_destination": false,
    "sniff_timeout": "100ms"
    }
    ],
    "outbounds": [
    {
    "type": "direct",
    "tag": "DIRECT"
    },
    {
    "type": "block",
    "tag": "REJECT"
    },
    {
    "type": "dns",
    "tag": "dns-out"
    },

    },
    {
    "type": "selector",
    "tag": "🚀 节点选择",
    "outbounds": [
    "⚡️ 自动选择",
    "香港 - LUMEN",
    "🇭🇰 CAC 香港 02",
    "HKG",
    "🇵🇱 波兰",
    "🇯🇵 Gcore",
    "🇯🇵 日本",
    "🇸🇬 新加坡",
    "🇭🇰 香港",
    "🇹🇼 台湾",
    "🇰🇷 arm-tailscale",
    "🇰🇷 arm1",
    "🇺🇸 Racknerd",
    "🇭🇰 CAC 香港 01",
    "🇨🇦 CAC 加拿大 01",
    "🇩🇪 CAC 德国 01",
    "🇺🇸 CAC 美国 01",
    "🇯🇵 CAC 日本 01"
    ]
    },
    {
    "type": "urltest",
    "tag": "⚡️ 自动选择",
    "outbounds": [
    "香港 - LUMEN",
    "🇭🇰 CAC 香港 02",
    "HKG",
    "🇵🇱 波兰",
    "🇯🇵 Gcore",
    "🇯🇵 日本",
    "🇸🇬 新加坡",
    "🇭🇰 香港",
    "🇹🇼 台湾",
    "🇰🇷 arm-tailscale",
    "🇰🇷 arm1",
    "🇺🇸 Racknerd",
    "🇭🇰 CAC 香港 01",
    "🇨🇦 CAC 加拿大 01",
    "🇩🇪 CAC 德国 01",
    "🇺🇸 CAC 美国 01",
    "🇯🇵 CAC 日本 01"
    ]
    },
    {
    "type": "selector",
    "tag": "GLOBAL",
    "outbounds": [
    "🚀 节点选择",
    "DIRECT",
    "REJECT",
    "⚡️ 自动选择",
    "香港 - LUMEN",
    "🇭🇰 CAC 香港 02",
    "HKG",
    "🇵🇱 波兰",
    "🇯🇵 Gcore",
    "🇯🇵 日本",
    "🇸🇬 新加坡",
    "🇭🇰 香港",
    "🇹🇼 台湾",
    "🇰🇷 arm-tailscale",
    "🇰🇷 arm1",
    "🇺🇸 Racknerd",
    "🇭🇰 CAC 香港 01",
    "🇨🇦 CAC 加拿大 01",
    "🇩🇪 CAC 德国 01",
    "🇺🇸 CAC 美国 01",
    "🇯🇵 CAC 日本 01"
    ]
    },
    {
    "type": "selector",
    "tag": "💬 AI 服务",
    "outbounds": [
    "🚀 节点选择",
    "DIRECT",
    "REJECT",
    "⚡️ 自动选择",
    "香港 - LUMEN",
    "🇭🇰 CAC 香港 02",
    "HKG",
    "🇵🇱 波兰",
    "🇯🇵 Gcore",
    "🇯🇵 日本",
    "🇸🇬 新加坡",
    "🇭🇰 香港",
    "🇹🇼 台湾",
    "🇰🇷 arm-tailscale",
    "🇰🇷 arm1",
    "🇺🇸 Racknerd",
    "🇭🇰 CAC 香港 01",
    "🇨🇦 CAC 加拿大 01",
    "🇩🇪 CAC 德国 01",
    "🇺🇸 CAC 美国 01",
    "🇯🇵 CAC 日本 01"
    ]
    },
    {
    "type": "selector",
    "tag": "📲 电报消息",
    "outbounds": [
    "🚀 节点选择",
    "DIRECT",
    "REJECT",
    "⚡️ 自动选择",
    "香港 - LUMEN",
    "🇭🇰 CAC 香港 02",
    "HKG",
    "🇵🇱 波兰",
    "🇯🇵 Gcore",
    "🇯🇵 日本",
    "🇸🇬 新加坡",