├── .github ├── dependabot.yml └── workflows │ ├── ad-hosts-lite.yml │ ├── ad-hosts-pro.yml │ ├── ad-youtube-hosts.yml │ ├── allow.yml │ ├── bilibili-hosts.yml │ ├── cn-blocked-domain.yml │ ├── del.yml │ ├── dns-adgh-lite-853-all.yml │ ├── dns-adgh-lite-853.yml │ ├── dns-adgh-lite-https-all.yml │ ├── dns-adgh-lite-https-lite-lite.yml │ ├── dns-adgh-lite-https-lite.yml │ ├── dns-adgh-lite-https.yml │ ├── dns-adgh-lite-ip-https.yml │ ├── dns-adgh-pro.yml │ ├── dns-all-test.yml │ ├── dns-all.yml │ ├── dns-trli-ip.yml │ ├── edge-hosts.yml │ ├── gfw-hosts.yml │ ├── gfwlist2agh_modify.yml │ ├── github-dnstype.yml │ ├── github-hosts.yml │ ├── go-update.yml │ ├── pac.yml │ └── serv00-login.yml ├── CNAME ├── file-hosts.sh ├── ad-hosts │ ├── ad-hosts-lite.sh │ ├── ad-hosts-pro.sh │ └── ad-youtube-hosts.sh ├── allow.sh ├── bilibili │ └── bilibili.sh ├── cn-blocked-domain │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ ├── common.go │ ├── config.yaml │ ├── crawler │ │ └── crawl.go │ ├── go.mod │ ├── go.sum │ ├── main.go │ ├── program.go │ ├── tree.go │ └── utils │ │ ├── color.go │ │ └── error.go ├── dns-hosts │ ├── dns-adgh-lite-853-all.sh │ ├── dns-adgh-lite-853.sh │ ├── dns-adgh-lite-https-all.sh │ ├── dns-adgh-lite-https-lite-lite.sh │ ├── dns-adgh-lite-https-lite.sh │ ├── dns-adgh-lite-https.sh │ ├── dns-adgh-lite-ip-https.sh │ ├── dns-adgh-pro.sh │ ├── dns-adgh-trli-ip.sh │ ├── dns-all.sh │ ├── dns-test.sh │ ├── gfwlist2agh_modify.sh │ └── test │ │ └── dns-all.py ├── dnstype.txt │ ├── dnstype-bilibili.py │ ├── dnstype-gfw.py │ ├── dnstype-hosts.py │ └── requirements.txt ├── edge-hosts.sh ├── github │ ├── bilibili-hosts.sh │ ├── gfw-hosts.sh │ ├── hosts.sh │ ├── ph.py │ └── requirements.txt └── pac.sh ├── file-hosts ├── Domains │ ├── AccelerateHosts │ │ └── Domains │ ├── apple │ │ └── Domains │ ├── china │ │ ├── Domains │ │ ├── china-root │ │ └── video-domains │ └── gfw │ │ └── Domains ├── ad-hosts │ ├── ad-ns-hosts │ ├── adblock │ ├── hosts │ └── test-trli-dns.txt ├── allow │ ├── Domains │ ├── adblock │ └── dns-domains.txt ├── dns-china.txt └── gfwlist2agh_modify │ └── gfwlist2agh_modify_final.txt ├── file ├── Ydns │ └── ydns-ddns.sh ├── acme.sh │ └── acme-Mirror.sh ├── aria2 │ ├── aria2.sh │ └── tracker.sh ├── bash │ ├── git-rm.sh │ └── github-dns.sh ├── clang-build │ ├── .gitignore │ ├── .style.yapf │ ├── LICENSE │ ├── README.md │ ├── build-binutils.py │ ├── build-llvm.py │ ├── build.sh │ ├── ruff.toml │ └── tc_build │ │ ├── __init__.py │ │ ├── binutils.py │ │ ├── builder.py │ │ ├── kernel.py │ │ ├── llvm.py │ │ ├── source.py │ │ ├── tools.py │ │ └── utils.py ├── gh-proxy │ ├── Dockerfile │ ├── LICENSE │ ├── app │ │ ├── main.py │ │ └── uwsgi.ini │ ├── entrypoint.sh │ ├── favicon.ico │ ├── index.html │ └── index.js ├── ios-dns │ ├── index.html │ ├── other │ │ ├── doh-pure.onedns.net.mobileconfig │ │ ├── doh.pub-doh.mobileconfig │ │ ├── dot-pure.onedns.net.mobileconfig │ │ ├── dot.360.cn-dot.mobileconfig │ │ ├── dot.pub-dot.mobileconfig │ │ └── sm2.doh.pub-doh.mobileconfig │ └── trli │ │ └── cdn-doh │ │ ├── ad-dns-lite1-cdn-doh.mobileconfig │ │ ├── ad-dns-lite2-cdn-doh.mobileconfig │ │ ├── ad-dns-pro1-cdn-doh.mobileconfig │ │ ├── ad-dns-pro2-cdn-doh.mobileconfig │ │ ├── dns-apple1-cdn-doh.mobileconfig │ │ ├── dns-apple2-cdn-doh.mobileconfig │ │ ├── dns-hosts1-cdn-doh.mobileconfig │ │ ├── dns-hosts2-cdn-doh.mobileconfig │ │ ├── dns1-cdn-doh.mobileconfig │ │ └── dns2-cdn-doh.mobileconfig ├── js │ ├── background-html.js │ └── pure.mini.js ├── openwrt │ ├── README.md │ ├── oray │ │ ├── x3pro-config-file │ │ └── x4c-config-file │ ├── r68s │ │ ├── immortalwrt │ │ │ └── config │ │ └── lede │ │ │ └── config │ └── x86 │ │ └── lede-config ├── other │ ├── README.md │ ├── 天翼网盘amy.txt │ └── 百度amy.txt ├── picture │ ├── 0.jpg │ ├── 1.png │ ├── 3.jpg │ ├── ali-hb.jpg │ └── alipay.jpg ├── serv00-login │ └── login.py ├── ssl-rtt │ └── ssl.sh ├── sysctl │ ├── debian-sysctl.conf │ ├── fedora-sysctrl.conf │ └── openwrt-sysctl.conf ├── web │ ├── dns-cn-cdn.html │ ├── dns-cn.html │ ├── dns.html │ └── test │ │ ├── .user.ini │ │ ├── 404.html │ │ ├── css │ │ └── style.css │ │ ├── favicon.ico │ │ ├── img │ │ └── Terrorism.svg │ │ └── index.html ├── winbat │ ├── update.txt │ └── winbat-dns.txt └── wx │ ├── WXDatConvter.exe │ └── 说明.txt └── index.html /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "github-actions" # GitHub Actions 9 | directory: "/" 10 | schedule: 11 | interval: "daily" 12 | timezone: "Asia/Shanghai" 13 | time: "07:00" 14 | pull-request-branch-name: 15 | separator: "-" 16 | 17 | - package-ecosystem: "pip" # GitHub Actions 18 | directory: "./file-hosts.sh/github" 19 | schedule: 20 | interval: "daily" 21 | timezone: "Asia/Shanghai" 22 | time: "07:00" 23 | pull-request-branch-name: 24 | separator: "-" 25 | 26 | - package-ecosystem: "gomod" 27 | directory: "/file-hosts.sh/cn-blocked-domain" 28 | schedule: 29 | interval: "daily" 30 | timezone: "Asia/Shanghai" 31 | time: "07:00" 32 | pull-request-branch-name: 33 | separator: "-" 34 | 35 | - package-ecosystem: "pip" # GitHub Actions 36 | directory: "./file-hosts.sh/bilibili" 37 | schedule: 38 | interval: "daily" 39 | timezone: "Asia/Shanghai" 40 | time: "07:00" 41 | pull-request-branch-name: 42 | separator: "-" 43 | 44 | - package-ecosystem: "pip" # GitHub Actions 45 | directory: "./file-hosts.sh/dnstype.txt" 46 | schedule: 47 | interval: "daily" 48 | timezone: "Asia/Shanghai" 49 | time: "07:00" 50 | pull-request-branch-name: 51 | separator: "-" -------------------------------------------------------------------------------- /.github/workflows/ad-hosts-lite.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: ad-hosts-lite 4 | 5 | # Controls when the workflow will run 6 | on: 7 | workflow_dispatch: 8 | schedule: 9 | - cron: "0 */1 * * *" 10 | 11 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 12 | jobs: 13 | # This workflow contains a single job called "build" 14 | build: 15 | # The type of runner that the job will run on 16 | runs-on: ubuntu-latest 17 | 18 | # Steps represent a sequence of tasks that will be executed as part of the job 19 | steps: 20 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 21 | - name: Checkout 22 | uses: actions/checkout@main 23 | # Runs a single command using the runners shell 24 | - name: Build dns 25 | run: | 26 | bash ./file/bash/github-dns.sh 27 | 28 | - name: Build AdHosts 29 | run: | 30 | bash ./file-hosts.sh/ad-hosts/ad-hosts-lite.sh 31 | - name: Release 32 | uses: svenstaro/upload-release-action@master 33 | with: 34 | repo_token: ${{ secrets.GITHUBTOKEN }} 35 | tag: ad-hosts-lite 36 | file: ./ad-* 37 | file_glob: true 38 | overwrite: true 39 | body: "update ad-hosts-lite" 40 | -------------------------------------------------------------------------------- /.github/workflows/ad-hosts-pro.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: ad-hosts-pro 4 | 5 | # Controls when the workflow will run 6 | on: 7 | workflow_dispatch: 8 | schedule: 9 | - cron: "0 */1 * * *" 10 | 11 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 12 | jobs: 13 | # This workflow contains a single job called "build" 14 | build: 15 | # The type of runner that the job will run on 16 | runs-on: ubuntu-latest 17 | 18 | # Steps represent a sequence of tasks that will be executed as part of the job 19 | steps: 20 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 21 | - name: Checkout 22 | uses: actions/checkout@main 23 | # Runs a single command using the runners shell 24 | - name: Build dns 25 | run: | 26 | bash ./file/bash/github-dns.sh 27 | 28 | - name: Build AdHosts 29 | run: | 30 | bash ./file-hosts.sh/ad-hosts/ad-hosts-pro.sh 31 | - name: Release 32 | uses: svenstaro/upload-release-action@master 33 | with: 34 | repo_token: ${{ secrets.GITHUBTOKEN }} 35 | tag: ad-hosts-pro 36 | file: ./ad-* 37 | file_glob: true 38 | overwrite: true 39 | body: "update ad-hosts-pro" -------------------------------------------------------------------------------- /.github/workflows/ad-youtube-hosts.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: Hosts-youtube 4 | 5 | # Controls when the workflow will run 6 | on: 7 | workflow_dispatch: 8 | schedule: 9 | - cron: "0 12 * * *" 10 | 11 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 12 | jobs: 13 | # This workflow contains a single job called "build" 14 | build: 15 | # The type of runner that the job will run on 16 | runs-on: ubuntu-latest 17 | 18 | # Steps represent a sequence of tasks that will be executed as part of the job 19 | steps: 20 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 21 | - name: Checkout 22 | uses: actions/checkout@main 23 | # Runs a single command using the runners shell 24 | - name: Build AdHosts 25 | run: | 26 | bash ./file-hosts.sh/ad-hosts/ad-youtube-hosts.sh 27 | #- name: Build dns 28 | # run: | 29 | # bash ./file/bash/github-dns.sh 30 | 31 | #- name: update github 32 | # run: | 33 | #cp ./ad-youtube-* ./ad-hosts/ad-youtube/ 34 | #git remote rm origin 35 | #git config --local user.name "github-actions[bot]" 36 | #git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" 37 | #git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUBTOKEN }}@github.com/${{ github.repository }}" 38 | #git gc --aggressive 39 | #git add ./ad-hosts/ad-youtube/ 40 | #git commit -m "update ad-youtube $(date +%Y.%m.%d.%H.%M)" 41 | #git push -f -u origin main 42 | - name: Release 43 | uses: svenstaro/upload-release-action@master 44 | with: 45 | repo_token: ${{ secrets.GITHUBTOKEN }} 46 | tag: ad-youtube-hosts 47 | file: ./ad-youtube-* 48 | file_glob: true 49 | overwrite: true 50 | body: "update ad-youtube" 51 | -------------------------------------------------------------------------------- /.github/workflows/allow.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: Allow 4 | 5 | # Controls when the workflow will run 6 | on: 7 | workflow_dispatch: 8 | schedule: 9 | - cron: "0 */12 * * *" 10 | 11 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 12 | jobs: 13 | # This workflow contains a single job called "build" 14 | build: 15 | # The type of runner that the job will run on 16 | runs-on: ubuntu-latest 17 | 18 | # Steps represent a sequence of tasks that will be executed as part of the job 19 | steps: 20 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 21 | - name: Checkout 22 | uses: actions/checkout@main 23 | # Runs a single command using the runners shell 24 | #- name: Build dns 25 | # run: | 26 | # bash ./file/bash/github-dns.sh 27 | - name: Build Allow 28 | run: | 29 | bash ./file-hosts.sh/allow.sh 30 | #- name: update github 31 | # run: | 32 | # cp ./allow.txt ./allow/allow.txt 33 | # git remote rm origin 34 | # git config --local user.name "github-actions[bot]" 35 | # git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" 36 | # git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUBTOKEN }}@github.com/${{ github.repository }}" 37 | # git gc --aggressive 38 | # git add ./allow/allow.txt 39 | # git commit -m "update allow $(date +%Y.%m.%d.%H.%M)" 40 | # git push -f -u origin main 41 | - name: Release 42 | uses: svenstaro/upload-release-action@master 43 | with: 44 | repo_token: ${{ secrets.GITHUBTOKEN }} 45 | tag: github-hosts 46 | file: ./allow.txt 47 | file_glob: true 48 | overwrite: true 49 | body: "update github-hosts" 50 | -------------------------------------------------------------------------------- /.github/workflows/bilibili-hosts.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: bilibili-Hosts 4 | 5 | # Controls when the workflow will run 6 | on: 7 | workflow_dispatch: 8 | schedule: 9 | - cron: "0 */4 * * *" 10 | 11 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 12 | jobs: 13 | # This workflow contains a single job called "build" 14 | build: 15 | # The type of runner that the job will run on 16 | runs-on: ubuntu-latest 17 | 18 | # Steps represent a sequence of tasks that will be executed as part of the job 19 | steps: 20 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 21 | - name: Checkout 22 | uses: actions/checkout@main 23 | # Runs a single command using the runners shell 24 | - name: Build bilibiloi-cdn 25 | run: | 26 | bash ./file-hosts.sh/bilibili/bilibili.sh 27 | 28 | #- name: push ad-hosts-coding 29 | # run: | 30 | # cp ./ad-edge-hosts.txt ./ad-hosts/ad-edge-hosts.txt 31 | # git remote rm origin 32 | # git config --local user.name "github-actions[bot]" 33 | # git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" 34 | # git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUBTOKEN }}@github.com/${{ github.repository }}" 35 | # git gc --aggressive 36 | # git add ./ad-hosts/ad-edge-hosts.txt 37 | # git commit -m "update ad-edge-hosts $(date +%Y.%m.%d.%H.%M)" 38 | # git push -f -u origin main 39 | # continue-on-error: true 40 | - name: Release update bilibili-cdn 41 | uses: svenstaro/upload-release-action@master 42 | with: 43 | repo_token: ${{ secrets.GITHUBTOKEN }} 44 | tag: github-hosts 45 | file: ./bilibili-cdn.txt 46 | file_glob: true 47 | overwrite: true 48 | body: "update github-hosts" 49 | 50 | -------------------------------------------------------------------------------- /.github/workflows/cn-blocked-domain.yml: -------------------------------------------------------------------------------- 1 | name: cn-blocked-domain 2 | on: 3 | workflow_dispatch: 4 | schedule: 5 | - cron: "0 */3 * * *" 6 | jobs: 7 | crawl: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Setup Go 1.x.y 11 | uses: actions/setup-go@main 12 | with: 13 | go-version: ^1.24 14 | 15 | - name: Checkout codebase 16 | uses: actions/checkout@main 17 | 18 | - name: Build dns 19 | run: | 20 | bash ./file/bash/github-dns.sh 21 | 22 | - name: Get cn-blocked-domain & run 23 | run: | 24 | cd ./file-hosts.sh/cn-blocked-domain 25 | go run ./ 26 | 27 | #- name: Git push 28 | # run: | 29 | # cp ./cn-blocked-domain/publish/ip.txt ./Domains/cn-blocked-domain/ 30 | # cp ./cn-blocked-domain/publish/domains.txt ./Domains/cn-blocked-domain/ 31 | # cp ./cn-blocked-domain/publish/raw.txt ./Domains/cn-blocked-domain/ 32 | # git remote rm origin 33 | # git config --local user.name "github-actions[bot]" 34 | # git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" 35 | # git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUBTOKEN }}@github.com/${{ github.repository }}" 36 | # git gc --aggressive 37 | # git add ./Domains/cn-blocked-domain/ 38 | # git commit -m "update cn-blocked-domain txt $(date +%Y.%m.%d.%H.%M)" 39 | # git push -f -u origin main 40 | - name: Release 41 | uses: svenstaro/upload-release-action@master 42 | with: 43 | repo_token: ${{ secrets.GITHUBTOKEN }} 44 | tag: cn-blocked-domain 45 | file: ./file-hosts.sh/cn-blocked-domain/publish/* 46 | file_glob: true 47 | overwrite: true 48 | body: "update cn-blocked-domain" 49 | -------------------------------------------------------------------------------- /.github/workflows/del.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: del 4 | 5 | # Controls when the workflow will run 6 | on: 7 | workflow_dispatch: 8 | schedule: 9 | - cron: "0 */12 * * *" 10 | 11 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 12 | jobs: 13 | # This workflow contains a single job called "build" 14 | build: 15 | # The type of runner that the job will run on 16 | runs-on: ubuntu-latest 17 | 18 | # Steps represent a sequence of tasks that will be executed as part of the job 19 | steps: 20 | # 删除无用 workflow runs; 21 | - name: Delete workflow runs 22 | uses: GitRML/delete-workflow-runs@main 23 | with: 24 | retain_days: 0.1 25 | keep_minimum_runs: 1 26 | -------------------------------------------------------------------------------- /.github/workflows/dns-adgh-lite-853-all.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: DnsHosts-adgh-lite-853-all 4 | 5 | # Controls when the workflow will run 6 | on: 7 | workflow_dispatch: 8 | schedule: 9 | - cron: "0 */4 * * *" 10 | 11 | # A workflow run is mDnsh up of one or more jobs that can run sequentially or in parallel 12 | jobs: 13 | # This workflow contains a single job called "build" 14 | build: 15 | # The type of runner that the job will run on 16 | runs-on: ubuntu-latest 17 | 18 | # Steps represent a sequence of tasks that will be executed as part of the job 19 | steps: 20 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 21 | - name: Checkout 22 | uses: actions/checkout@main 23 | # Runs a single command using the runners shell 24 | - name: Build GFWList2AGH 25 | run: | 26 | bash ./file-hosts.sh/dns-hosts/dns-adgh-lite-853-all.sh 27 | - name: name GFWList2AGH 28 | run: | 29 | mv ./dns-adguardhome/blacklist_full.txt ./dnshosts-adgh-lite-adguardhome-blacklist_full.txt 30 | mv ./dns-adguardhome/blacklist_full_combine.txt ./dnshosts-adgh-lite-adguardhome-blacklist_full_combine.txt 31 | mv ./dns-adguardhome/whitelist_full.txt ./dnshosts-adgh-lite-adguardhome-whitelist_full.txt 32 | mv ./dns-adguardhome/whitelist_full_combine.txt ./dnshosts-adgh-lite-adguardhome-whitelist_full_combine.txt 33 | mv ./dns-adguardhome_new/blacklist_full.txt ./dnshosts-adgh-lite-adguardhome-new-blacklist_full.txt 34 | mv ./dns-adguardhome_new/blacklist_full_combine.txt ./dnshosts-adgh-lite-adguardhome-new-blacklist_full_combine.txt 35 | mv ./dns-adguardhome_new/whitelist_full.txt ./dnshosts-adgh-lite-adguardhome-new-whitelist_full.txt 36 | mv ./dns-adguardhome_new/whitelist_full_combine.txt ./dnshosts-adgh-lite-adguardhome-new-whitelist_full_combine.txt 37 | - name: Release 38 | uses: svenstaro/upload-release-action@master 39 | with: 40 | repo_token: ${{ secrets.GITHUBTOKEN }} 41 | tag: dns-hosts-adgh-lite-853-all 42 | file: ./dnshosts-adgh-lite* 43 | file_glob: true 44 | overwrite: true 45 | body: "update dns-hosts-adgh-lite" -------------------------------------------------------------------------------- /.github/workflows/dns-adgh-lite-853.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: DnsHosts-adgh-lite-853 4 | 5 | # Controls when the workflow will run 6 | on: 7 | workflow_dispatch: 8 | schedule: 9 | - cron: "0 */4 * * *" 10 | 11 | # A workflow run is mDnsh up of one or more jobs that can run sequentially or in parallel 12 | jobs: 13 | # This workflow contains a single job called "build" 14 | build: 15 | # The type of runner that the job will run on 16 | runs-on: ubuntu-latest 17 | 18 | # Steps represent a sequence of tasks that will be executed as part of the job 19 | steps: 20 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 21 | - name: Checkout 22 | uses: actions/checkout@main 23 | # Runs a single command using the runners shell 24 | - name: Build GFWList2AGH 25 | run: | 26 | bash ./file-hosts.sh/dns-hosts/dns-adgh-lite-853.sh 27 | - name: name GFWList2AGH 28 | run: | 29 | mv ./dns-adguardhome/blacklist_full.txt ./dnshosts-adgh-lite-adguardhome-blacklist_full.txt 30 | mv ./dns-adguardhome/blacklist_full_combine.txt ./dnshosts-adgh-lite-adguardhome-blacklist_full_combine.txt 31 | mv ./dns-adguardhome/whitelist_full.txt ./dnshosts-adgh-lite-adguardhome-whitelist_full.txt 32 | mv ./dns-adguardhome/whitelist_full_combine.txt ./dnshosts-adgh-lite-adguardhome-whitelist_full_combine.txt 33 | mv ./dns-adguardhome_new/blacklist_full.txt ./dnshosts-adgh-lite-adguardhome-new-blacklist_full.txt 34 | mv ./dns-adguardhome_new/blacklist_full_combine.txt ./dnshosts-adgh-lite-adguardhome-new-blacklist_full_combine.txt 35 | mv ./dns-adguardhome_new/whitelist_full.txt ./dnshosts-adgh-lite-adguardhome-new-whitelist_full.txt 36 | mv ./dns-adguardhome_new/whitelist_full_combine.txt ./dnshosts-adgh-lite-adguardhome-new-whitelist_full_combine.txt 37 | - name: Release 38 | uses: svenstaro/upload-release-action@master 39 | with: 40 | repo_token: ${{ secrets.GITHUBTOKEN }} 41 | tag: dns-hosts-adgh-lite-853 42 | file: ./dnshosts-adgh-lite* 43 | file_glob: true 44 | overwrite: true 45 | body: "update dns-hosts-adgh-lite" 46 | -------------------------------------------------------------------------------- /.github/workflows/dns-adgh-lite-https-all.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: DnsHosts-adgh-lite-https-all 4 | 5 | # Controls when the workflow will run 6 | on: 7 | workflow_dispatch: 8 | schedule: 9 | - cron: "0 */4 * * *" 10 | 11 | # A workflow run is mDnsh up of one or more jobs that can run sequentially or in parallel 12 | jobs: 13 | # This workflow contains a single job called "build" 14 | build: 15 | # The type of runner that the job will run on 16 | runs-on: ubuntu-latest 17 | 18 | # Steps represent a sequence of tasks that will be executed as part of the job 19 | steps: 20 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 21 | - name: Checkout 22 | uses: actions/checkout@main 23 | # Runs a single command using the runners shell 24 | - name: Build GFWList2AGH 25 | run: | 26 | bash ./file-hosts.sh/dns-hosts/dns-adgh-lite-https-all.sh 27 | - name: name GFWList2AGH 28 | run: | 29 | mv ./dns-adguardhome/blacklist_full.txt ./dnshosts-adgh-lite-adguardhome-blacklist_full.txt 30 | mv ./dns-adguardhome/blacklist_full_combine.txt ./dnshosts-adgh-lite-adguardhome-blacklist_full_combine.txt 31 | mv ./dns-adguardhome/whitelist_full.txt ./dnshosts-adgh-lite-adguardhome-whitelist_full.txt 32 | mv ./dns-adguardhome/whitelist_full_combine.txt ./dnshosts-adgh-lite-adguardhome-whitelist_full_combine.txt 33 | mv ./dns-adguardhome_new/blacklist_full.txt ./dnshosts-adgh-lite-adguardhome-new-blacklist_full.txt 34 | mv ./dns-adguardhome_new/blacklist_full_combine.txt ./dnshosts-adgh-lite-adguardhome-new-blacklist_full_combine.txt 35 | mv ./dns-adguardhome_new/whitelist_full.txt ./dnshosts-adgh-lite-adguardhome-new-whitelist_full.txt 36 | mv ./dns-adguardhome_new/whitelist_full_combine.txt ./dnshosts-adgh-lite-adguardhome-new-whitelist_full_combine.txt 37 | - name: Release 38 | uses: svenstaro/upload-release-action@master 39 | with: 40 | repo_token: ${{ secrets.GITHUBTOKEN }} 41 | tag: dns-hosts-adgh-lite-https-all 42 | file: ./dnshosts-adgh-lite* 43 | file_glob: true 44 | overwrite: true 45 | body: "update dns-hosts-adgh-lite-https-all" -------------------------------------------------------------------------------- /.github/workflows/dns-adgh-lite-https-lite-lite.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: DnsHosts-adgh-lite-https-lite-lite 4 | 5 | # Controls when the workflow will run 6 | on: 7 | workflow_dispatch: 8 | schedule: 9 | - cron: "0 */4 * * *" 10 | 11 | # A workflow run is mDnsh up of one or more jobs that can run sequentially or in parallel 12 | jobs: 13 | # This workflow contains a single job called "build" 14 | build: 15 | # The type of runner that the job will run on 16 | runs-on: ubuntu-latest 17 | 18 | # Steps represent a sequence of tasks that will be executed as part of the job 19 | steps: 20 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 21 | - name: Checkout 22 | uses: actions/checkout@main 23 | # Runs a single command using the runners shell 24 | - name: Build GFWList2AGH 25 | run: | 26 | bash ./file-hosts.sh/dns-hosts/dns-adgh-lite-https-lite-lite.sh 27 | - name: name GFWList2AGH 28 | run: | 29 | mv ./dns-adguardhome/blacklist_full.txt ./dnshosts-adgh-lite-adguardhome-blacklist_full.txt 30 | mv ./dns-adguardhome/blacklist_full_combine.txt ./dnshosts-adgh-lite-adguardhome-blacklist_full_combine.txt 31 | mv ./dns-adguardhome/whitelist_full.txt ./dnshosts-adgh-lite-adguardhome-whitelist_full.txt 32 | mv ./dns-adguardhome/whitelist_full_combine.txt ./dnshosts-adgh-lite-adguardhome-whitelist_full_combine.txt 33 | mv ./dns-adguardhome_new/blacklist_full.txt ./dnshosts-adgh-lite-adguardhome-new-blacklist_full.txt 34 | mv ./dns-adguardhome_new/blacklist_full_combine.txt ./dnshosts-adgh-lite-adguardhome-new-blacklist_full_combine.txt 35 | mv ./dns-adguardhome_new/whitelist_full.txt ./dnshosts-adgh-lite-adguardhome-new-whitelist_full.txt 36 | mv ./dns-adguardhome_new/whitelist_full_combine.txt ./dnshosts-adgh-lite-adguardhome-new-whitelist_full_combine.txt 37 | - name: Release 38 | uses: svenstaro/upload-release-action@master 39 | with: 40 | repo_token: ${{ secrets.GITHUBTOKEN }} 41 | tag: dns-hosts-adgh-lite-https-lite-lite 42 | file: ./dnshosts-adgh-lite* 43 | file_glob: true 44 | overwrite: true 45 | body: "update dns-hosts-adgh-lite" 46 | -------------------------------------------------------------------------------- /.github/workflows/dns-adgh-lite-https-lite.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: DnsHosts-adgh-lite-https-lite 4 | 5 | # Controls when the workflow will run 6 | on: 7 | workflow_dispatch: 8 | schedule: 9 | - cron: "0 */4 * * *" 10 | 11 | # A workflow run is mDnsh up of one or more jobs that can run sequentially or in parallel 12 | jobs: 13 | # This workflow contains a single job called "build" 14 | build: 15 | # The type of runner that the job will run on 16 | runs-on: ubuntu-latest 17 | 18 | # Steps represent a sequence of tasks that will be executed as part of the job 19 | steps: 20 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 21 | - name: Checkout 22 | uses: actions/checkout@main 23 | # Runs a single command using the runners shell 24 | - name: Build GFWList2AGH 25 | run: | 26 | bash ./file-hosts.sh/dns-hosts/dns-adgh-lite-https-lite.sh 27 | - name: name GFWList2AGH 28 | run: | 29 | mv ./dns-adguardhome/blacklist_full.txt ./dnshosts-adgh-lite-adguardhome-blacklist_full.txt 30 | mv ./dns-adguardhome/blacklist_full_combine.txt ./dnshosts-adgh-lite-adguardhome-blacklist_full_combine.txt 31 | mv ./dns-adguardhome/whitelist_full.txt ./dnshosts-adgh-lite-adguardhome-whitelist_full.txt 32 | mv ./dns-adguardhome/whitelist_full_combine.txt ./dnshosts-adgh-lite-adguardhome-whitelist_full_combine.txt 33 | mv ./dns-adguardhome_new/blacklist_full.txt ./dnshosts-adgh-lite-adguardhome-new-blacklist_full.txt 34 | mv ./dns-adguardhome_new/blacklist_full_combine.txt ./dnshosts-adgh-lite-adguardhome-new-blacklist_full_combine.txt 35 | mv ./dns-adguardhome_new/whitelist_full.txt ./dnshosts-adgh-lite-adguardhome-new-whitelist_full.txt 36 | mv ./dns-adguardhome_new/whitelist_full_combine.txt ./dnshosts-adgh-lite-adguardhome-new-whitelist_full_combine.txt 37 | - name: Release 38 | uses: svenstaro/upload-release-action@master 39 | with: 40 | repo_token: ${{ secrets.GITHUBTOKEN }} 41 | tag: dns-hosts-adgh-lite-https-lite 42 | file: ./dnshosts-adgh-lite* 43 | file_glob: true 44 | overwrite: true 45 | body: "update dns-hosts-adgh-lite" 46 | -------------------------------------------------------------------------------- /.github/workflows/dns-adgh-lite-https.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: DnsHosts-adgh-lite-https 4 | 5 | # Controls when the workflow will run 6 | on: 7 | workflow_dispatch: 8 | schedule: 9 | - cron: "0 */4 * * *" 10 | 11 | # A workflow run is mDnsh up of one or more jobs that can run sequentially or in parallel 12 | jobs: 13 | # This workflow contains a single job called "build" 14 | build: 15 | # The type of runner that the job will run on 16 | runs-on: ubuntu-latest 17 | 18 | # Steps represent a sequence of tasks that will be executed as part of the job 19 | steps: 20 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 21 | - name: Checkout 22 | uses: actions/checkout@main 23 | # Runs a single command using the runners shell 24 | - name: Build GFWList2AGH 25 | run: | 26 | bash ./file-hosts.sh/dns-hosts/dns-adgh-lite-https.sh 27 | - name: name GFWList2AGH 28 | run: | 29 | mv ./dns-adguardhome/blacklist_full.txt ./dnshosts-adgh-lite-adguardhome-blacklist_full.txt 30 | mv ./dns-adguardhome/blacklist_full_combine.txt ./dnshosts-adgh-lite-adguardhome-blacklist_full_combine.txt 31 | mv ./dns-adguardhome/whitelist_full.txt ./dnshosts-adgh-lite-adguardhome-whitelist_full.txt 32 | mv ./dns-adguardhome/whitelist_full_combine.txt ./dnshosts-adgh-lite-adguardhome-whitelist_full_combine.txt 33 | mv ./dns-adguardhome_new/blacklist_full.txt ./dnshosts-adgh-lite-adguardhome-new-blacklist_full.txt 34 | mv ./dns-adguardhome_new/blacklist_full_combine.txt ./dnshosts-adgh-lite-adguardhome-new-blacklist_full_combine.txt 35 | mv ./dns-adguardhome_new/whitelist_full.txt ./dnshosts-adgh-lite-adguardhome-new-whitelist_full.txt 36 | mv ./dns-adguardhome_new/whitelist_full_combine.txt ./dnshosts-adgh-lite-adguardhome-new-whitelist_full_combine.txt 37 | - name: Release 38 | uses: svenstaro/upload-release-action@master 39 | with: 40 | repo_token: ${{ secrets.GITHUBTOKEN }} 41 | tag: dns-hosts-adgh-lite-https 42 | file: ./dnshosts-adgh-lite* 43 | file_glob: true 44 | overwrite: true 45 | body: "update dns-hosts-adgh-lite" 46 | -------------------------------------------------------------------------------- /.github/workflows/dns-adgh-lite-ip-https.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: DnsHosts-adgh-lite-ip-https 4 | 5 | # Controls when the workflow will run 6 | on: 7 | workflow_dispatch: 8 | schedule: 9 | - cron: "0 */4 * * *" 10 | 11 | # A workflow run is mDnsh up of one or more jobs that can run sequentially or in parallel 12 | jobs: 13 | # This workflow contains a single job called "build" 14 | build: 15 | # The type of runner that the job will run on 16 | runs-on: ubuntu-latest 17 | 18 | # Steps represent a sequence of tasks that will be executed as part of the job 19 | steps: 20 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 21 | - name: Checkout 22 | uses: actions/checkout@main 23 | # Runs a single command using the runners shell 24 | - name: Build GFWList2AGH 25 | run: | 26 | bash ./file-hosts.sh/dns-hosts/dns-adgh-lite-ip-https.sh 27 | - name: name GFWList2AGH 28 | run: | 29 | mv ./dns-adguardhome/blacklist_full.txt ./dnshosts-adgh-lite-adguardhome-blacklist_full.txt 30 | mv ./dns-adguardhome/blacklist_full_combine.txt ./dnshosts-adgh-lite-adguardhome-blacklist_full_combine.txt 31 | mv ./dns-adguardhome/whitelist_full.txt ./dnshosts-adgh-lite-adguardhome-whitelist_full.txt 32 | mv ./dns-adguardhome/whitelist_full_combine.txt ./dnshosts-adgh-lite-adguardhome-whitelist_full_combine.txt 33 | mv ./dns-adguardhome_new/blacklist_full.txt ./dnshosts-adgh-lite-adguardhome-new-blacklist_full.txt 34 | mv ./dns-adguardhome_new/blacklist_full_combine.txt ./dnshosts-adgh-lite-adguardhome-new-blacklist_full_combine.txt 35 | mv ./dns-adguardhome_new/whitelist_full.txt ./dnshosts-adgh-lite-adguardhome-new-whitelist_full.txt 36 | mv ./dns-adguardhome_new/whitelist_full_combine.txt ./dnshosts-adgh-lite-adguardhome-new-whitelist_full_combine.txt 37 | - name: Release 38 | uses: svenstaro/upload-release-action@master 39 | with: 40 | repo_token: ${{ secrets.GITHUBTOKEN }} 41 | tag: dns-hosts-adgh-lite-ip-https 42 | file: ./dnshosts-adgh-lite* 43 | file_glob: true 44 | overwrite: true 45 | body: "update dns-hosts-adgh-lite-ip-https" 46 | -------------------------------------------------------------------------------- /.github/workflows/dns-adgh-pro.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: DnsHosts-adgh-pro 4 | 5 | # Controls when the workflow will run 6 | on: 7 | workflow_dispatch: 8 | schedule: 9 | - cron: "0 */4 * * *" 10 | 11 | # A workflow run is mDnsh up of one or more jobs that can run sequentially or in parallel 12 | jobs: 13 | # This workflow contains a single job called "build" 14 | build: 15 | # The type of runner that the job will run on 16 | runs-on: ubuntu-latest 17 | 18 | # Steps represent a sequence of tasks that will be executed as part of the job 19 | steps: 20 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 21 | - name: Checkout 22 | uses: actions/checkout@main 23 | # Runs a single command using the runners shell 24 | - name: Build GFWList2AGH 25 | run: | 26 | bash ./file-hosts.sh/dns-hosts/dns-adgh-pro.sh 27 | - name: name GFWList2AGH 28 | run: | 29 | mv ./dns-adguardhome/blacklist_full.txt ./dnshosts-adgh-pro-adguardhome-blacklist_full.txt 30 | mv ./dns-adguardhome/blacklist_full_combine.txt ./dnshosts-adgh-pro-adguardhome-blacklist_full_combine.txt 31 | mv ./dns-adguardhome/whitelist_full.txt ./dnshosts-adgh-pro-adguardhome-whitelist_full.txt 32 | mv ./dns-adguardhome/whitelist_full_combine.txt ./dnshosts-adgh-pro-adguardhome-whitelist_full_combine.txt 33 | mv ./dns-adguardhome_new/blacklist_full.txt ./dnshosts-adgh-pro-adguardhome-new-blacklist_full.txt 34 | mv ./dns-adguardhome_new/blacklist_full_combine.txt ./dnshosts-adgh-pro-adguardhome-new-blacklist_full_combine.txt 35 | mv ./dns-adguardhome_new/whitelist_full.txt ./dnshosts-adgh-pro-adguardhome-new-whitelist_full.txt 36 | mv ./dns-adguardhome_new/whitelist_full_combine.txt ./dnshosts-adgh-pro-adguardhome-new-whitelist_full_combine.txt 37 | - name: Release 38 | uses: svenstaro/upload-release-action@master 39 | with: 40 | repo_token: ${{ secrets.GITHUBTOKEN }} 41 | tag: dns-hosts-adgh-pro 42 | file: ./dnshosts-adgh-pro* 43 | file_glob: true 44 | overwrite: true 45 | body: "update dns-hosts-adgh-pro" -------------------------------------------------------------------------------- /.github/workflows/dns-all-test.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: DnsHosts-all-test 4 | 5 | # Controls when the workflow will run 6 | on: 7 | workflow_dispatch: 8 | schedule: 9 | - cron: "0 */4 * * *" 10 | 11 | # A workflow run is mDnsh up of one or more jobs that can run sequentially or in parallel 12 | jobs: 13 | # This workflow contains a single job called "build" 14 | build: 15 | # The type of runner that the job will run on 16 | runs-on: ubuntu-latest 17 | 18 | # Steps represent a sequence of tasks that will be executed as part of the job 19 | steps: 20 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 21 | - name: Checkout 22 | uses: actions/checkout@main 23 | # Runs a single command using the runners shell 24 | 25 | - name: Build dns 26 | run: | 27 | bash ./file/bash/github-dns.sh 28 | 29 | - name: Build GFWList2AGH 30 | run: | 31 | bash ./file-hosts.sh/dns-hosts/dns-test.sh 32 | 33 | - name: Release 34 | uses: svenstaro/upload-release-action@master 35 | with: 36 | repo_token: ${{ secrets.GITHUBTOKEN }} 37 | tag: dns-hosts-all-test 38 | file: ./hosts-dns/output/dnshosts-all-* 39 | file_glob: true 40 | overwrite: true 41 | body: "update dns-hosts-all" 42 | -------------------------------------------------------------------------------- /.github/workflows/dns-all.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: DnsHosts-all 4 | 5 | # Controls when the workflow will run 6 | on: 7 | workflow_dispatch: 8 | schedule: 9 | - cron: "0 */4 * * *" 10 | 11 | # A workflow run is mDnsh up of one or more jobs that can run sequentially or in parallel 12 | jobs: 13 | # This workflow contains a single job called "build" 14 | build: 15 | # The type of runner that the job will run on 16 | runs-on: ubuntu-latest 17 | 18 | # Steps represent a sequence of tasks that will be executed as part of the job 19 | steps: 20 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 21 | - name: Checkout 22 | uses: actions/checkout@main 23 | # Runs a single command using the runners shell 24 | - name: Build dns 25 | run: | 26 | bash ./file/bash/github-dns.sh 27 | 28 | - name: Build GFWList2AGH 29 | run: | 30 | bash ./file-hosts.sh/dns-hosts/dns-all.sh 31 | 32 | - name: Release 33 | uses: svenstaro/upload-release-action@master 34 | with: 35 | repo_token: ${{ secrets.GITHUBTOKEN }} 36 | tag: dns-hosts-all 37 | file: ./hosts-dns/output/dnshosts-all-* 38 | file_glob: true 39 | overwrite: true 40 | body: "update dns-hosts-all" 41 | -------------------------------------------------------------------------------- /.github/workflows/dns-trli-ip.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: DnsHosts-trli-ip 4 | 5 | # Controls when the workflow will run 6 | on: 7 | workflow_dispatch: 8 | schedule: 9 | - cron: "0 */4 * * *" 10 | 11 | # A workflow run is mDnsh up of one or more jobs that can run sequentially or in parallel 12 | jobs: 13 | # This workflow contains a single job called "build" 14 | build: 15 | # The type of runner that the job will run on 16 | runs-on: ubuntu-latest 17 | 18 | # Steps represent a sequence of tasks that will be executed as part of the job 19 | steps: 20 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 21 | - name: Checkout 22 | uses: actions/checkout@main 23 | # Runs a single command using the runners shell 24 | - name: Build GFWList2AGH 25 | run: | 26 | bash ./file-hosts.sh/dns-hosts/dns-adgh-trli-ip.sh 27 | 28 | - name: Release 29 | uses: svenstaro/upload-release-action@master 30 | with: 31 | repo_token: ${{ secrets.GITHUBTOKEN }} 32 | tag: dns-hosts-trli-ip 33 | file: ./hosts-dns/output/dnshosts-all-* 34 | file_glob: true 35 | overwrite: true 36 | body: "update dns-hosts-trli-ip" 37 | -------------------------------------------------------------------------------- /.github/workflows/edge-hosts.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: edge-Hosts 4 | 5 | # Controls when the workflow will run 6 | on: 7 | workflow_dispatch: 8 | schedule: 9 | - cron: "0 */6 * * *" 10 | 11 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 12 | jobs: 13 | # This workflow contains a single job called "build" 14 | build: 15 | # The type of runner that the job will run on 16 | runs-on: ubuntu-latest 17 | 18 | # Steps represent a sequence of tasks that will be executed as part of the job 19 | steps: 20 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 21 | - name: Checkout 22 | uses: actions/checkout@main 23 | # Runs a single command using the runners shell 24 | - name: Build AdHosts 25 | run: | 26 | bash ./file-hosts.sh/edge-hosts.sh 27 | #- name: push ad-hosts-coding 28 | # run: | 29 | # cp ./ad-edge-hosts.txt ./ad-hosts/ad-edge-hosts.txt 30 | # git remote rm origin 31 | # git config --local user.name "github-actions[bot]" 32 | # git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" 33 | # git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUBTOKEN }}@github.com/${{ github.repository }}" 34 | # git gc --aggressive 35 | # git add ./ad-hosts/ad-edge-hosts.txt 36 | # git commit -m "update ad-edge-hosts $(date +%Y.%m.%d.%H.%M)" 37 | # git push -f -u origin main 38 | # continue-on-error: true 39 | - name: Release 40 | uses: svenstaro/upload-release-action@master 41 | with: 42 | repo_token: ${{ secrets.GITHUBTOKEN }} 43 | tag: github-hosts 44 | file: ./ad-edge-hosts.txt 45 | file_glob: true 46 | overwrite: true 47 | body: "update github-hosts" 48 | -------------------------------------------------------------------------------- /.github/workflows/gfw-hosts.yml: -------------------------------------------------------------------------------- 1 | name: GFWHosts 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | - cron: "0 */6 * * *" 7 | 8 | jobs: 9 | build: 10 | 11 | runs-on: ubuntu-latest 12 | strategy: 13 | matrix: 14 | python-version: [3.11.0] 15 | 16 | steps: 17 | - uses: actions/checkout@main 18 | - name: Set up Python ${{ matrix.python-version }} 19 | uses: actions/setup-python@main 20 | with: 21 | python-version: ${{ matrix.python-version }} 22 | 23 | - name: Build dns 24 | run: | 25 | bash ./file/bash/github-dns.sh 26 | 27 | - name: Install dependencies 28 | run: | 29 | cd file-hosts.sh/github 30 | python -m pip install --upgrade pip 31 | if [ -f requirements.txt ]; then pip install -r requirements.txt; fi 32 | 33 | - name: update hosts 34 | run: | 35 | sh ./file-hosts.sh/github/gfw-hosts.sh 36 | 37 | #- name: update github 38 | # run: | 39 | # cp ./file-hosts.sh/github/gfw-Hosts.txt ./Domains/AccelerateHosts/gfw-hosts.txt 40 | # git remote rm origin 41 | # git config --local user.name "github-actions[bot]" 42 | # git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" 43 | # git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUBTOKEN }}@github.com/${{ github.repository }}" 44 | # git gc --aggressive 45 | # git add ./Domains/AccelerateHosts/gfw-hosts.txt 46 | # git commit -m "update gfw-hosts $(date +%Y.%m.%d.%H.%M)" 47 | # git push -f -u origin main 48 | - name: Release 49 | uses: svenstaro/upload-release-action@master 50 | with: 51 | repo_token: ${{ secrets.GITHUBTOKEN }} 52 | tag: github-hosts 53 | file: ./file-hosts.sh/github/gfw-Hosts.txt 54 | file_glob: true 55 | overwrite: true 56 | body: "update github-hosts" -------------------------------------------------------------------------------- /.github/workflows/gfwlist2agh_modify.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: gfwlist2agh_modify 4 | 5 | # Controls when the workflow will run 6 | on: 7 | workflow_dispatch: 8 | schedule: 9 | - cron: "0 */4 * * *" 10 | 11 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 12 | jobs: 13 | # This workflow contains a single job called "build" 14 | build: 15 | # The type of runner that the job will run on 16 | runs-on: ubuntu-latest 17 | 18 | # Steps represent a sequence of tasks that will be executed as part of the job 19 | steps: 20 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 21 | - name: Checkout 22 | uses: actions/checkout@main 23 | # Runs a single command using the runners shell 24 | - name: Build gfwlist2agh_modify 25 | run: | 26 | bash ./file-hosts.sh/dns-hosts/gfwlist2agh_modify.sh 27 | 28 | #- name: update github 29 | # run: | 30 | # cp ./listpac_* ./file/pac/ 31 | # git remote rm origin 32 | # git config --local user.name "github-actions[bot]" 33 | # git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" 34 | # git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUBTOKEN }}@github.com/${{ github.repository }}" 35 | # git gc --aggressive 36 | # git add ./file/pac/ 37 | # git commit -m "update pac $(date +%Y.%m.%d.%H.%M)" 38 | # git push -f -u origin main 39 | - name: Git push 40 | run: | 41 | git init 42 | git config --local user.name "github-actions[bot]" 43 | git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" 44 | git remote rm origin 45 | git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUBTOKEN }}@github.com/${{ github.repository }}" 46 | git gc --aggressive 47 | git add ./file-hosts/gfwlist2agh_modify/gfwlist2agh_modify_final.txt 48 | git commit -m "$(date +%Y%m%d%H%M)" 49 | git push -f -u origin main 50 | -------------------------------------------------------------------------------- /.github/workflows/github-dnstype.yml: -------------------------------------------------------------------------------- 1 | name: Github-dnstype 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | - cron: "0 */1 * * *" 7 | 8 | jobs: 9 | build: 10 | 11 | runs-on: ubuntu-latest 12 | strategy: 13 | matrix: 14 | python-version: [3.13.0-beta.3] 15 | 16 | steps: 17 | - uses: actions/checkout@main 18 | - name: Set up Python ${{ matrix.python-version }} 19 | uses: actions/setup-python@main 20 | with: 21 | python-version: ${{ matrix.python-version }} 22 | 23 | - name: Build dns 24 | run: | 25 | bash ./file/bash/github-dns.sh 26 | 27 | - name: Install dependencies 28 | run: | 29 | cd file-hosts.sh/dnstype.txt 30 | python -m pip install --upgrade pip 31 | if [ -f requirements.txt ]; then pip install -r requirements.txt; fi 32 | 33 | - name: update Accelerate-hosts-dnstype 34 | run: | 35 | python ./file-hosts.sh/dnstype.txt/dnstype-hosts.py 36 | 37 | - name: update bilibili-hosts-dnstype 38 | run: | 39 | python ./file-hosts.sh/dnstype.txt/dnstype-bilibili.py 40 | 41 | - name: update gfw-hosts-dnstype 42 | run: | 43 | python ./file-hosts.sh/dnstype.txt/dnstype-gfw.py 44 | 45 | #- name: update github 46 | # run: | 47 | # cp ./file-hosts.sh/github/Accelerate-Hosts.txt ./Domains/AccelerateHosts/github-hosts.txt 48 | # git remote rm origin 49 | # git config --local user.name "github-actions[bot]" 50 | #git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" 51 | # git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUBTOKEN }}@github.com/${{ github.repository }}" 52 | # git gc --aggressive 53 | #git add ./Domains/AccelerateHosts/github-hosts.txt 54 | #git commit -m "update github-hosts $(date +%Y.%m.%d.%H.%M)" 55 | #git push -f -u origin main 56 | - name: Release Accelerate-hosts-dnstype 57 | uses: svenstaro/upload-release-action@master 58 | with: 59 | repo_token: ${{ secrets.GITHUBTOKEN }} 60 | tag: github--dnstype 61 | file: ./file-hosts.sh/dnstype.txt/Accelerate-Hosts-dnstype.txt 62 | file_glob: true 63 | overwrite: true 64 | body: "update github-hosts" 65 | 66 | - name: Release bilibili-hosts-dnstype 67 | uses: svenstaro/upload-release-action@master 68 | with: 69 | repo_token: ${{ secrets.GITHUBTOKEN }} 70 | tag: github--dnstype 71 | file: ./file-hosts.sh/dnstype.txt/bilibili-Hosts-dnstype.txt 72 | file_glob: true 73 | overwrite: true 74 | body: "update github-hosts" 75 | 76 | - name: Release gfw-hosts-dnstype 77 | uses: svenstaro/upload-release-action@master 78 | with: 79 | repo_token: ${{ secrets.GITHUBTOKEN }} 80 | tag: github--dnstype 81 | file: ./file-hosts.sh/dnstype.txt/gfw-Hosts-dnstype.txt 82 | file_glob: true 83 | overwrite: true 84 | body: "update github-hosts" 85 | -------------------------------------------------------------------------------- /.github/workflows/github-hosts.yml: -------------------------------------------------------------------------------- 1 | name: GithubHosts 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | - cron: "0 */1 * * *" 7 | 8 | jobs: 9 | build: 10 | 11 | runs-on: ubuntu-latest 12 | strategy: 13 | matrix: 14 | python-version: [3.13.0-beta.3] 15 | 16 | steps: 17 | - uses: actions/checkout@main 18 | - name: Set up Python ${{ matrix.python-version }} 19 | uses: actions/setup-python@main 20 | with: 21 | python-version: ${{ matrix.python-version }} 22 | 23 | - name: Build dns 24 | run: | 25 | bash ./file/bash/github-dns.sh 26 | 27 | - name: Install dependencies 28 | run: | 29 | cd file-hosts.sh/github 30 | python -m pip install --upgrade pip 31 | if [ -f requirements.txt ]; then pip install -r requirements.txt; fi 32 | 33 | - name: update Accelerate-hosts 34 | run: | 35 | sh ./file-hosts.sh/github/hosts.sh 36 | 37 | - name: update bilibili-hosts 38 | run: | 39 | sh ./file-hosts.sh/github/bilibili-hosts.sh 40 | 41 | #- name: update github 42 | # run: | 43 | # cp ./file-hosts.sh/github/Accelerate-Hosts.txt ./Domains/AccelerateHosts/github-hosts.txt 44 | # git remote rm origin 45 | # git config --local user.name "github-actions[bot]" 46 | #git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" 47 | # git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUBTOKEN }}@github.com/${{ github.repository }}" 48 | # git gc --aggressive 49 | #git add ./Domains/AccelerateHosts/github-hosts.txt 50 | #git commit -m "update github-hosts $(date +%Y.%m.%d.%H.%M)" 51 | #git push -f -u origin main 52 | - name: Release 53 | uses: svenstaro/upload-release-action@master 54 | with: 55 | repo_token: ${{ secrets.GITHUBTOKEN }} 56 | tag: github-hosts 57 | file: ./file-hosts.sh/github/Accelerate-Hosts.txt 58 | file_glob: true 59 | overwrite: true 60 | body: "update github-hosts" 61 | 62 | - name: Release update bilibili-cdn 63 | uses: svenstaro/upload-release-action@master 64 | with: 65 | repo_token: ${{ secrets.GITHUBTOKEN }} 66 | tag: github-hosts 67 | file: ./file-hosts.sh/github/bilibili-hosts.txt 68 | file_glob: true 69 | overwrite: true 70 | body: "update github-hosts" 71 | -------------------------------------------------------------------------------- /.github/workflows/go-update.yml: -------------------------------------------------------------------------------- 1 | name: go-update(cn-blocked-domain) 2 | on: 3 | workflow_dispatch: 4 | schedule: 5 | - cron: "0 */3 * * *" 6 | jobs: 7 | go: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Setup Go 1.x.y 11 | uses: actions/setup-go@main 12 | with: 13 | go-version: ^1.24 14 | - name: Checkout codebase 15 | uses: actions/checkout@main 16 | 17 | - name: go 18 | run: | 19 | cd ./file-hosts.sh/cn-blocked-domain 20 | go mod tidy -compat=1.24 21 | gofmt -w -r 'interface{} -> any' . 22 | go get -u 23 | go mod download 24 | - name: Git push 25 | run: | 26 | git init 27 | git config --local user.name "github-actions[bot]" 28 | git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" 29 | git remote rm origin 30 | git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUBTOKEN }}@github.com/${{ github.repository }}" 31 | git gc --aggressive 32 | git add ./file-hosts.sh/cn-blocked-domain 33 | git commit -m "$(date +%Y%m%d%H%M)" 34 | git push -f -u origin main 35 | -------------------------------------------------------------------------------- /.github/workflows/pac.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: ListPac 4 | 5 | # Controls when the workflow will run 6 | on: 7 | workflow_dispatch: 8 | schedule: 9 | - cron: "0 */4 * * *" 10 | 11 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 12 | jobs: 13 | # This workflow contains a single job called "build" 14 | build: 15 | # The type of runner that the job will run on 16 | runs-on: ubuntu-latest 17 | 18 | # Steps represent a sequence of tasks that will be executed as part of the job 19 | steps: 20 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 21 | - name: Checkout 22 | uses: actions/checkout@main 23 | # Runs a single command using the runners shell 24 | - name: Build pac 25 | run: | 26 | bash ./file-hosts.sh/pac.sh 27 | 28 | #- name: update github 29 | # run: | 30 | # cp ./listpac_* ./file/pac/ 31 | # git remote rm origin 32 | # git config --local user.name "github-actions[bot]" 33 | # git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" 34 | # git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUBTOKEN }}@github.com/${{ github.repository }}" 35 | # git gc --aggressive 36 | # git add ./file/pac/ 37 | # git commit -m "update pac $(date +%Y.%m.%d.%H.%M)" 38 | # git push -f -u origin main 39 | - name: Release 40 | uses: svenstaro/upload-release-action@master 41 | with: 42 | repo_token: ${{ secrets.GITHUBTOKEN }} 43 | tag: listpac 44 | file: ./listpac_* 45 | file_glob: true 46 | overwrite: true 47 | body: "update listpac" 48 | -------------------------------------------------------------------------------- /.github/workflows/serv00-login.yml: -------------------------------------------------------------------------------- 1 | name: serv00-login 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | - cron: "0 0 */3 * *" # 每三天运行一次,可以根据需求调整时间 7 | 8 | jobs: 9 | login: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - name: Checkout 仓库代码 14 | uses: actions/checkout@main 15 | 16 | - name: 设置 Python 环境 17 | uses: actions/setup-python@main 18 | with: 19 | python-version: '3.13.2' # 设置你希望使用的 Python 版本,建议使用稳定版本 20 | 21 | - name: Create accounts.json from environment variable 22 | run: echo "$ACCOUNTS_JSON" > accounts.json 23 | env: 24 | ACCOUNTS_JSON: ${{ secrets.ACCOUNTS_JSON }} # 从GitHub Secrets中获取环境变量 25 | 26 | - name: 安装依赖 27 | run: | 28 | python -m pip install --upgrade pip 29 | pip install pyppeteer aiofiles requests 30 | pip install --upgrade pyppeteer 31 | 32 | - name: 运行登录脚本 33 | env: 34 | ACCOUNTS_JSON: ${{ secrets.ACCOUNTS_JSON }} 35 | run: | 36 | python file/serv00-login/login.py 37 | -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | file-git.trli.club -------------------------------------------------------------------------------- /file-hosts.sh/bilibili/bilibili.sh: -------------------------------------------------------------------------------- 1 | temp_file=$(mktemp) 2 | 3 | curl https://raw.githubusercontent.com/BililiveRecorder/website/main/src/data/cdn/bcdn.json | grep -o "\w.*com" >> $temp_file 4 | curl https://raw.githubusercontent.com/BililiveRecorder/website/main/src/data/cdn/gotcha.json | grep -o "\w.*com" >> $temp_file 5 | 6 | # 合并并去重 7 | sort -u $temp_file > bilibili-cdn.txt 8 | 9 | # 删除临时文件 10 | rm $temp_file 11 | -------------------------------------------------------------------------------- /file-hosts.sh/cn-blocked-domain/.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | 8 | # Test binary, built with `go test -c` 9 | *.test 10 | 11 | # Output of the go coverage tool, specifically when used with LiteIDE 12 | *.out 13 | 14 | # Dependency directories (remove the comment below to include it) 15 | # vendor/ 16 | -------------------------------------------------------------------------------- /file-hosts.sh/cn-blocked-domain/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Loyalsoldier 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /file-hosts.sh/cn-blocked-domain/README.md: -------------------------------------------------------------------------------- 1 | # 简介 2 | 3 | 本项目用于爬取 **Greatfire Analyzer** 检测到的在中国大陆被屏蔽的域名和 IP 地址。 4 | 5 | ## 下载地址 6 | 7 | 如果不希望自行爬取列表,可直接下载使用下面列表: 8 | 9 | - **domains.txt**:[https://file-git.trli.club/Domains/cn-blocked-domain/domains.txt](https://file-git.trli.club/Domains/cn-blocked-domain/domains.txt) 10 | - **ip.txt**:[https://file-git.trli.club/Domains/cn-blocked-domain/ip.txt](https://file-git.trli.club/Domains/cn-blocked-domain/ip.txt) 11 | 12 | ## 项目使用方式 13 | 14 | 如果希望自行爬取列表,按照下面步骤操作: 15 | 16 | 1. 安装 `git` 和 v1.14.0 或更新版本的 `Golang` 17 | 2. 克隆项目代码:`git clone https://github.com/trli-dns/cn-blocked-domain.git` 18 | 3. 进入项目根目录:`cd cn-blocked-domain` 19 | 4. 运行:`go run ./` 20 | 21 | 更多配置项,可查看项目根目录内的默认配置文件 `config.yaml`。 22 | 23 | ## 使用本项目的项目 24 | 25 | - [@Loyalsoldier/v2ray-rules-dat](https://github.com/Loyalsoldier/v2ray-rules-dat) 26 | - [@Loyalsoldier/clash-rules](https://github.com/Loyalsoldier/clash-rules) 27 | - [@Loyalsoldier/surge-rules](https://github.com/Loyalsoldier/surge-rules) 28 | -------------------------------------------------------------------------------- /file-hosts.sh/cn-blocked-domain/common.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "log" 5 | "strings" 6 | 7 | "cn-blocked-domain/utils" 8 | ) 9 | 10 | func buildTreeAndUnique(sortedDomainList []string) []string { 11 | tree := newList() 12 | remainList := make([]string, 0, len(sortedDomainList)) 13 | 14 | for _, domain := range sortedDomainList { 15 | parts := strings.Split(domain, ".") 16 | leafIdx, isInserted, err := tree.Insert(parts) 17 | 18 | if err != nil { 19 | log.Println(utils.Fatal("[Error]"), "check domain", utils.Info(domain), "for redundancy.") 20 | continue 21 | } 22 | if !isInserted { 23 | redundantParts := make([]string, 0, len(parts)) 24 | for i := 0; i <= leafIdx; i++ { 25 | redundantParts = append(redundantParts, parts[i]) 26 | } 27 | redundantStr := strings.Join(redundantParts, ".") 28 | log.Println("Found redundant domain:", utils.Info(domain), "@", utils.Warning(redundantStr)) 29 | continue 30 | } 31 | remainList = append(remainList, domain) 32 | } 33 | 34 | return remainList 35 | } 36 | -------------------------------------------------------------------------------- /file-hosts.sh/cn-blocked-domain/config.yaml: -------------------------------------------------------------------------------- 1 | crawl: 2 | url: 3 | base_url: https://en.greatfire.org/search/ 4 | init_suffix_url: ?page=0 5 | suffix_url: ?page= 6 | types: 7 | - name: alexaTop1000 8 | type_url: alexa-top-1000-domains 9 | referer: https://en.greatfire.org 10 | is_crawl: true # true means to crawl this type. false means not to crawl it. 11 | from: 0 # 0 means to start to crawl from page 0 12 | to: -1 # -1 means to crawl all the pages of this type 13 | - name: blocked 14 | type_url: blocked 15 | referer: https://en.greatfire.org 16 | is_crawl: true 17 | from: 0 18 | to: -1 19 | - name: domains 20 | type_url: domains 21 | referer: https://en.greatfire.org 22 | is_crawl: false 23 | from: 0 24 | to: -1 25 | - name: ipAddresses 26 | type_url: ip-addresses 27 | referer: https://en.greatfire.org 28 | is_crawl: true 29 | from: 0 30 | to: -1 31 | init_element: 32 | container: ul.pager 33 | content: .pager-last.last a 34 | attr: href 35 | splitter: ?page= 36 | crawl_element: 37 | container: table.gf-header tbody tr 38 | content: td.first a 39 | attr: href 40 | condition: td.blocked 41 | filter: 42 | regexp: 43 | domain: ^\/(https?\/)?([a-zA-Z0-9][-_a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-_a-zA-Z0-9]{0,62})+)$ 44 | ip: ^(([0-9]{1,3}\.){3}[0-9]{1,3}) 45 | percent: 50 # set the minimal "blocked" percent to filter content 46 | customize: 47 | cpu_cores: 0 # set the number of CPU cores to run the project. 0 means set by the program automatically 48 | max_capacity: 50000 # set the capacity of the channel to deliver results temporarily 49 | output_dir: ./publish 50 | raw_filename: raw.txt 51 | domain_filename: domains.txt 52 | ip_filename: ip.txt 53 | -------------------------------------------------------------------------------- /file-hosts.sh/cn-blocked-domain/crawler/crawl.go: -------------------------------------------------------------------------------- 1 | package crawler 2 | 3 | import ( 4 | "errors" 5 | "net/http" 6 | "net/url" 7 | "runtime" 8 | "strconv" 9 | ) 10 | 11 | func genUA() (userAgent string) { 12 | switch runtime.GOOS { 13 | case "linux": 14 | userAgent = `Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0` 15 | case "darwin": 16 | userAgent = `Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36` 17 | case "windows": 18 | userAgent = `Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0` 19 | } 20 | return 21 | } 22 | 23 | // Crawl crawls webpage content and returns *gzip.Reader 24 | func Crawl(target, referer string) (*http.Response, error) { 25 | if _, err := url.Parse(target); err != nil { 26 | return nil, err 27 | } 28 | req, err := http.NewRequest(http.MethodGet, target, nil) 29 | if err != nil { 30 | return nil, err 31 | } 32 | 33 | req.Header.Set("User-Agent", genUA()) 34 | req.Header.Set("Referer", referer) 35 | req.Header.Set("Accept-Encoding", "gzip") 36 | req.Header.Set("Accept-Language", "zh-CN,zh;q=0.9,en;q=0.8") 37 | req.Header.Set("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9") 38 | 39 | var client http.Client 40 | resp, err := client.Do(req) 41 | if err != nil { 42 | return nil, err 43 | } 44 | 45 | if resp.StatusCode != http.StatusOK { 46 | return nil, errors.New("bad status code: " + strconv.Itoa(resp.StatusCode)) 47 | } 48 | 49 | return resp, nil 50 | } 51 | -------------------------------------------------------------------------------- /file-hosts.sh/cn-blocked-domain/go.mod: -------------------------------------------------------------------------------- 1 | module cn-blocked-domain 2 | 3 | go 1.24 4 | 5 | tool golang.org/x/tools/cmd/stringer 6 | 7 | require ( 8 | github.com/PuerkitoBio/goquery v1.10.3 9 | gopkg.in/yaml.v3 v3.0.1 10 | ) 11 | 12 | require ( 13 | github.com/andybalholm/cascadia v1.3.3 // indirect 14 | golang.org/x/mod v0.17.0 // indirect 15 | golang.org/x/net v0.40.0 // indirect 16 | golang.org/x/sync v0.10.0 // indirect 17 | golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect 18 | ) 19 | -------------------------------------------------------------------------------- /file-hosts.sh/cn-blocked-domain/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "log" 6 | "os" 7 | ) 8 | 9 | var configFile = flag.String("c", "config.yaml", "Path to the configuration file, supports YAML and JSON.") 10 | 11 | func init() { 12 | flag.Parse() 13 | } 14 | 15 | func main() { 16 | rawConfig := new(RawConfig) 17 | config := new(Config) 18 | 19 | if err := rawConfig.ParseRawConfig(*configFile); err != nil { 20 | log.Fatal(err) 21 | os.Exit(1) 22 | } 23 | 24 | if err := config.GenerateConfig(rawConfig); err != nil { 25 | log.Fatal(err) 26 | os.Exit(2) 27 | } 28 | 29 | if err := config.SetNumCPU(); err != nil { 30 | log.Fatal(err) 31 | os.Exit(3) 32 | } 33 | 34 | for err := range config.CrawlMaxPage() { 35 | log.Fatal(err) 36 | os.Exit(4) 37 | } 38 | 39 | if err := config.GenerateCrawlList(); err != nil { 40 | log.Fatal(err) 41 | os.Exit(5) 42 | } 43 | 44 | maxCap := config.Customize.MaxCapacity 45 | rawResultChan := make(chan map[*string]int, maxCap) 46 | go config.Crawl(rawResultChan) 47 | config.FilterAndWrite(rawResultChan) 48 | } 49 | -------------------------------------------------------------------------------- /file-hosts.sh/cn-blocked-domain/tree.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "errors" 4 | 5 | type node struct { 6 | leaf bool 7 | children map[string]*node 8 | } 9 | 10 | func newNode() *node { 11 | return &node{ 12 | leaf: false, 13 | children: make(map[string]*node), 14 | } 15 | } 16 | 17 | func (n *node) getChild(s string) *node { 18 | return n.children[s] 19 | } 20 | 21 | func (n *node) hasChild(s string) bool { 22 | return n.getChild(s) != nil 23 | } 24 | 25 | func (n *node) addChild(s string, child *node) { 26 | n.children[s] = child 27 | } 28 | 29 | func (n *node) isLeaf() bool { 30 | return n.leaf 31 | } 32 | 33 | type domainList struct { 34 | root *node 35 | } 36 | 37 | func newList() *domainList { 38 | return &domainList{ 39 | root: newNode(), 40 | } 41 | } 42 | 43 | func (t *domainList) Insert(parts []string) (int, bool, error) { 44 | if len(parts) == 0 { 45 | return 0, false, errors.New("empty domain") 46 | } 47 | 48 | node := t.root 49 | for i := len(parts) - 1; i >= 0; i-- { 50 | part := parts[i] 51 | 52 | if node.isLeaf() { 53 | return i, false, nil 54 | } 55 | if !node.hasChild(part) { 56 | node.addChild(part, newNode()) 57 | if i == 0 { 58 | node.getChild(part).leaf = true 59 | return 0, true, nil 60 | } 61 | } 62 | node = node.getChild(part) 63 | } 64 | return 0, false, nil 65 | } 66 | -------------------------------------------------------------------------------- /file-hosts.sh/cn-blocked-domain/utils/color.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import "fmt" 4 | 5 | var ( 6 | Info = Teal 7 | Warning = Yellow 8 | Fatal = Red 9 | ) 10 | 11 | var ( 12 | Black = Color("\033[1;30m%s\033[0m") 13 | Red = Color("\033[1;31m%s\033[0m") 14 | Green = Color("\033[1;32m%s\033[0m") 15 | Yellow = Color("\033[1;33m%s\033[0m") 16 | Purple = Color("\033[1;34m%s\033[0m") 17 | Magenta = Color("\033[1;35m%s\033[0m") 18 | Teal = Color("\033[1;36m%s\033[0m") 19 | White = Color("\033[1;37m%s\033[0m") 20 | ) 21 | 22 | func Color(colorString string) func(...any) string { 23 | sprint := func(args ...any) string { 24 | return fmt.Sprintf(colorString, 25 | fmt.Sprint(args...)) 26 | } 27 | return sprint 28 | } 29 | -------------------------------------------------------------------------------- /file-hosts.sh/cn-blocked-domain/utils/error.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | // Must panics runtime error 4 | func Must(err error) { 5 | if err != nil { 6 | panic(err) 7 | } 8 | } 9 | 10 | func Must2(v any, err error) any { 11 | if err != nil { 12 | panic(err) 13 | } 14 | return v 15 | } 16 | -------------------------------------------------------------------------------- /file-hosts.sh/dns-hosts/gfwlist2agh_modify.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 定义所有链接 4 | gfwlist2agh_modify=( 5 | "https://raw.githubusercontent.com/hezhijie0327/GFWList2AGH/source/data/data_modify.txt" 6 | "https://raw.githubusercontent.com/Atroc-X/GFWList-AGH/source/data/data_modify.txt" 7 | "https://raw.githubusercontent.com/jimmyshjj/GFWList2AGH/source/data/data_modify.txt" 8 | ) 9 | 10 | # 下载、合并、去重 11 | tmpfile="gfwlist2agh_modify_merged.txt" 12 | > "$tmpfile" 13 | for url in "${gfwlist2agh_modify[@]}"; do 14 | curl -sL "$url" >> "$tmpfile" 15 | done 16 | 17 | # 确保输出目录存在 18 | mkdir -p ./file-hosts/gfwlist2agh_modify 19 | 20 | # 去重并去除空格和#号后输出到最终文件,删除所有包含 example.org 的行,并保留 (*&*)com.cn 21 | sort "$tmpfile" | uniq | sed 's/[[:space:]]//g' | sed '/^#/d;/^$/d' | grep -v 'example\.org' > ./file-hosts/gfwlist2agh_modify/gfwlist2agh_modify_final.txt 22 | 23 | # 可选:删除临时文件 24 | rm "$tmpfile" 25 | 26 | echo "合并去重完成,结果在 gfwlist2agh_modify_final.txt" 27 | -------------------------------------------------------------------------------- /file-hosts.sh/dnstype.txt/dnstype-bilibili.py: -------------------------------------------------------------------------------- 1 | # 导入必要的库 2 | import re 3 | import requests 4 | from datetime import datetime 5 | import pytz 6 | 7 | # 获取网络文件的内容 8 | response = requests.get('https://github.com/Potterli20/file/releases/download/github-hosts/bilibili-hosts.txt') 9 | lines = response.text.split('\n') 10 | 11 | # 去掉以#开始的行 12 | lines = [line for line in lines if not line.strip().startswith('#')] 13 | 14 | # 定义你的替换函数 15 | def replace_text(line): 16 | ipv4_pattern = r"(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\s+)(\S+)" 17 | ipv6_pattern = r"([0-9a-fA-F]{1,4}:[0-9a-fA-F:]{1,39}\s+)(\S+)" 18 | ipv4_replacement = "||\\2^$dnsrewrite=NOERROR;A;\\1" 19 | ipv6_replacement = "||\\2^$dnsrewrite=NOERROR;AAAA;\\1" 20 | line = re.sub(ipv4_pattern, ipv4_replacement, line) 21 | line = re.sub(ipv6_pattern, ipv6_replacement, line) 22 | return line 23 | 24 | # 获取当前的北京时间 25 | def get_time(): 26 | beijing_tz = pytz.timezone('Asia/Shanghai') 27 | beijing_time = datetime.now(beijing_tz) 28 | return beijing_time.strftime('%Y-%m-%d %H:%M:%S') 29 | 30 | # 应用替换函数到每一行 31 | new_lines = [replace_text(line) for line in lines] 32 | 33 | # 写入新的文件 34 | with open('./file-hosts.sh/dnstype.txt/bilibili-Hosts-dnstype.txt', 'w') as file: 35 | file.write('# Hosts Start \n') 36 | for line in new_lines: 37 | file.write(line + '\n') 38 | file.write('\n# Last update at %s (Beijing Time)\n'%(get_time())) 39 | file.write('# Star me GitHub url: https://github.com/Potterli20/file/releases/download/github--dnstype\n') 40 | file.write('# Hosts End \n\n') 41 | -------------------------------------------------------------------------------- /file-hosts.sh/dnstype.txt/dnstype-gfw.py: -------------------------------------------------------------------------------- 1 | # 导入必要的库 2 | import re 3 | import requests 4 | from datetime import datetime 5 | import pytz 6 | 7 | # 获取网络文件的内容 8 | response = requests.get('https://github.com/Potterli20/file/releases/download/github-hosts/gfw-Hosts.txt') 9 | lines = response.text.split('\n') 10 | 11 | # 去掉以#开始的行 12 | lines = [line for line in lines if not line.strip().startswith('#')] 13 | 14 | # 定义你的替换函数 15 | def replace_text(line): 16 | ipv4_pattern = r"(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\s+)(\S+)" 17 | ipv6_pattern = r"([0-9a-fA-F]{1,4}:[0-9a-fA-F:]{1,39}\s+)(\S+)" 18 | ipv4_replacement = "||\\2^$dnsrewrite=NOERROR;A;\\1" 19 | ipv6_replacement = "||\\2^$dnsrewrite=NOERROR;AAAA;\\1" 20 | line = re.sub(ipv4_pattern, ipv4_replacement, line) 21 | line = re.sub(ipv6_pattern, ipv6_replacement, line) 22 | return line 23 | 24 | # 获取当前的北京时间 25 | def get_time(): 26 | beijing_tz = pytz.timezone('Asia/Shanghai') 27 | beijing_time = datetime.now(beijing_tz) 28 | return beijing_time.strftime('%Y-%m-%d %H:%M:%S') 29 | 30 | # 应用替换函数到每一行 31 | new_lines = [replace_text(line) for line in lines] 32 | 33 | # 写入新的文件 34 | with open('./file-hosts.sh/dnstype.txt/gfw-Hosts-dnstype.txt', 'w') as file: 35 | file.write('# Hosts Start \n') 36 | for line in new_lines: 37 | file.write(line + '\n') 38 | file.write('\n# Last update at %s (Beijing Time)\n'%(get_time())) 39 | file.write('# Star me GitHub url: https://github.com/Potterli20/file/releases/download/github--dnstype\n') 40 | file.write('# Hosts End \n\n') -------------------------------------------------------------------------------- /file-hosts.sh/dnstype.txt/dnstype-hosts.py: -------------------------------------------------------------------------------- 1 | # 导入必要的库 2 | import re 3 | import requests 4 | from datetime import datetime 5 | import pytz 6 | 7 | # 获取网络文件的内容 8 | response = requests.get('https://github.com/Potterli20/file/releases/download/github-hosts/Accelerate-Hosts.txt') 9 | lines = response.text.split('\n') 10 | 11 | # 去掉以#开始的行 12 | lines = [line for line in lines if not line.strip().startswith('#')] 13 | 14 | # 定义你的替换函数 15 | def replace_text(line): 16 | ipv4_pattern = r"(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\s+)(\S+)" 17 | ipv6_pattern = r"([0-9a-fA-F]{1,4}:[0-9a-fA-F:]{1,39}\s+)(\S+)" 18 | ipv4_replacement = "||\\2^$dnsrewrite=NOERROR;A;\\1" 19 | ipv6_replacement = "||\\2^$dnsrewrite=NOERROR;AAAA;\\1" 20 | line = re.sub(ipv4_pattern, ipv4_replacement, line) 21 | line = re.sub(ipv6_pattern, ipv6_replacement, line) 22 | return line 23 | 24 | # 获取当前的北京时间 25 | def get_time(): 26 | beijing_tz = pytz.timezone('Asia/Shanghai') 27 | beijing_time = datetime.now(beijing_tz) 28 | return beijing_time.strftime('%Y-%m-%d %H:%M:%S') 29 | 30 | # 应用替换函数到每一行 31 | new_lines = [replace_text(line) for line in lines] 32 | 33 | # 写入新的文件 34 | with open('./file-hosts.sh/dnstype.txt/Accelerate-Hosts-dnstype.txt', 'w') as file: 35 | file.write('# Hosts Start \n') 36 | for line in new_lines: 37 | file.write(line + '\n') 38 | file.write('\n# Last update at %s (Beijing Time)\n'%(get_time())) 39 | file.write('# Star me GitHub url: https://github.com/Potterli20/file/releases/download/github--dnstype\n') 40 | file.write('# Hosts End \n\n') -------------------------------------------------------------------------------- /file-hosts.sh/dnstype.txt/requirements.txt: -------------------------------------------------------------------------------- 1 | requests==2.32.3 2 | pytz==2025.2 -------------------------------------------------------------------------------- /file-hosts.sh/edge-hosts.sh: -------------------------------------------------------------------------------- 1 | curl -s https://edge.microsoft.com/abusiveadblocking/api/v1/blocklist | grep -oP '(?<=url":")(.*?)(?=")' > ./ad-edge-hosts.txt 2 | -------------------------------------------------------------------------------- /file-hosts.sh/github/bilibili-hosts.sh: -------------------------------------------------------------------------------- 1 | wget -O ./file-hosts.sh/github/bilibili-cdn.txt https://github.com/Potterli20/file/releases/download/github-hosts/bilibili-cdn.txt 2 | python ./file-hosts.sh/github/ph.py -f ./file-hosts.sh/github/bilibili-cdn.txt -o ./file-hosts.sh/github/bilibili-hosts.txt 3 | -------------------------------------------------------------------------------- /file-hosts.sh/github/gfw-hosts.sh: -------------------------------------------------------------------------------- 1 | wget -O ./file-hosts.sh/github/domains.txt https://github.com/Potterli20/file/releases/download/cn-blocked-domain/domains.txt 2 | python ./file-hosts.sh/github/ph.py -f ./file-hosts.sh/github/domains.txt -o ./file-hosts.sh/github/gfw-Hosts.txt 3 | -------------------------------------------------------------------------------- /file-hosts.sh/github/hosts.sh: -------------------------------------------------------------------------------- 1 | python ./file-hosts.sh/github/ph.py -f ./file-hosts/Domains/AccelerateHosts/Domains -o ./file-hosts.sh/github/Accelerate-Hosts.txt 2 | -------------------------------------------------------------------------------- /file-hosts.sh/github/ph.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding:utf-8 3 | 4 | import socket 5 | import argparse 6 | import sys 7 | 8 | from datetime import datetime, timedelta, timezone 9 | from rich.console import Console 10 | 11 | console = Console() 12 | 13 | parser = argparse.ArgumentParser(description='Parse the github domain to get ip, or parse given domain.') 14 | parser.add_argument('-d','--domains',nargs='*',help = 'input domain to be parse') 15 | parser.add_argument('-f','--file',nargs='*',type=argparse.FileType('r'),help='give me a file here!') 16 | parser.add_argument('-o','--output',nargs=1,type=str,help='output name') 17 | args = parser.parse_args() 18 | 19 | domains = [] 20 | name = "Accelerate-Hosts.txt" 21 | 22 | if args.output: 23 | name = args.output[0] 24 | 25 | if args.domains: 26 | domains.extend(args.domains) 27 | elif args.file: 28 | for f in args.file: 29 | domains.extend(f.read().splitlines()) 30 | 31 | def get_ip_list(domain): # 获取域名解析出的IP列表 32 | ip_list = [] 33 | try: 34 | addrs = socket.getaddrinfo(domain, None) 35 | for item in addrs: 36 | ip = item[4][0] 37 | if ip not in ip_list: 38 | ip_list.append(ip) 39 | except Exception: 40 | ip_list.append(f'# No resolution for {domain}') 41 | return ip_list 42 | 43 | def gen_host(): 44 | for domain in domains: 45 | console.print('Querying ip for domain ',style="#66CCFF",end="") 46 | console.print(domain,style="#ff6800") 47 | ip_list = get_ip_list(domain.strip()) 48 | for ip in ip_list: 49 | yield (ip, domain) 50 | 51 | def get_time(format_string="%Y-%m-%d %H:%M:%S"):#"%Y-%m-%d %H:%M:%S" 52 | utc_dt = datetime.utcnow().replace(tzinfo=timezone.utc) 53 | bj_dt = utc_dt.astimezone(timezone(timedelta(hours=8))) 54 | return bj_dt.strftime(format_string) 55 | 56 | def output_hosts(): 57 | with open(name, 'w') as f: 58 | f.write('# Hosts Start \n') 59 | for ip, domain in gen_host(): 60 | console.print(f'ip {ip}') 61 | f.write(f'{ip.ljust(30)} {domain.strip()}\n') 62 | f.write(f'\n# Last update at {get_time()} (Beijing Time)') 63 | f.write('\n# Star me GitHub url: https://github.com/Potterli20/file/releases/download/github-hosts') 64 | f.write('\n# Hosts End \n\n') 65 | 66 | if __name__ == '__main__': 67 | output_hosts() 68 | -------------------------------------------------------------------------------- /file-hosts.sh/github/requirements.txt: -------------------------------------------------------------------------------- 1 | rich==14.0.0 2 | -------------------------------------------------------------------------------- /file-hosts/Domains/apple/Domains: -------------------------------------------------------------------------------- 1 | #https://doh.dns.apple.com/dns-query 2 | smp-device-content.apple.com 3 | apple-mapkit.com 4 | cdn-apple.com 5 | ml-cn.lb-apple.com.akadns.net 6 | lb-apple.com 7 | gsp10.apple-mapkit.com 8 | publicassets.cdn-apple.com 9 | push.apple.com 10 | mask.icloud.com 11 | mask-h2.icloud.com 12 | mask.apple-dns.net 13 | p213-fmfmobile.icloud.com.cn 14 | amp-api.music.apple.com 15 | mvod.itunes.apple.com 16 | mvod.itunes.g.aaplimg.com 17 | mvod-cn-lb.itunes-apple.com.akadns.net 18 | is1-ssl.mzstatic.com 19 | 46-courier.push.apple.com 20 | hls.itunes.apple.com.mwcname.com 21 | #https://support.apple.com/en-us/HT210060 22 | appledownload.qtlcdn.com 23 | me.apple-dns.net 24 | bag.itunes.apple.com 25 | mesu.apple.com 26 | appldnld.apple.com 27 | configuration.ls.apple.com 28 | iosapps.itunes.g.aaplimg.com 29 | iosapps.itunes.apple.com.download.ks-cdn.com 30 | iosapps.itunes.apple.com.m.alikunlun.net 31 | inappcheck-lb.itunes-apple.com.akadns.net 32 | inappcheck-cn.itunes-apple.com.akadns.net 33 | inappcheck.itunes.apple.com.w.alikunlun.com 34 | inappcheck.itunes.apple.com 35 | ioshost.qtlcdn.com 36 | albert.apple.com 37 | captive.apple.com 38 | gs.apple.com 39 | humb.apple.com 40 | static.ips.apple.com 41 | sq-device.apple.com 42 | tbsc.apple.com 43 | time-ios.apple.com 44 | time.apple.com 45 | time-macos.apple.com 46 | *.deviceenrollment.apple.com 47 | deviceservices-external.apple.com 48 | gdmf.apple.com 49 | itunes.apple.com 50 | updates-http.cdn-apple.com 51 | updates.cdn-apple.com 52 | lcdn-registration.apple.com 53 | suconfig.apple.com 54 | xp-cdn.apple.com 55 | lcdn-locator.apple.com 56 | serverstatus.apple.com 57 | api.apple-cloudkit.com 58 | bpapi.apple.com 59 | cssubmissions.apple.com 60 | fba.apple.com 61 | diagassets.apple.com 62 | doh.dns.apple.com 63 | certs.apple.com 64 | crl.apple.com 65 | ocsp2.apple.com 66 | valid.apple.com 67 | appleid.apple.com 68 | appleid.cdn-apple.com 69 | idmsa.apple.com 70 | gsa.apple.com 71 | *.apple-cloudkit.com 72 | *.apple-livephotoskit.com 73 | *.apzones.com 74 | *.cdn-apple.com 75 | *.gc.apple.com 76 | *.icloud.com 77 | *.icloud.com.cn 78 | *.icloud.apple.com 79 | *.icloud-content.com 80 | *.iwork.apple.com 81 | mask.icloud.com 82 | mask-h2.icloud.com 83 | mask-api.icloud.com 84 | guzzoni.apple.com 85 | *.smoot.apple.com 86 | app-site-association.cdn-apple.com 87 | app-site-association.networking.apple 88 | pos-device.apple.com 89 | phonesubmissions.apple.com 90 | audiocontentdownload.apple.com 91 | devimages-cdn.apple.com 92 | download.developer.apple.com 93 | playgrounds-assets-cdn.apple.com 94 | playgrounds-cdn.apple.com 95 | sylvan.apple.com 96 | *.appattest.apple.com 97 | itunes.com 98 | gg.apple.com 99 | ig.apple.com 100 | mesu.apple.com 101 | ns.itunes.apple.com 102 | oscdn.apple.com 103 | osrecovery.apple.com 104 | skl.apple.com 105 | swcdn.apple.com 106 | swdist.apple.com 107 | swdownload.apple.com 108 | swscan.apple.com 109 | xp.apple.com 110 | *.itunes.apple.com 111 | *.apps.apple.com 112 | ppq.apple.com 113 | appldnld.apple.com 114 | appldnld.apple.com.edgesuite.net 115 | -------------------------------------------------------------------------------- /file-hosts/Domains/china/china-root: -------------------------------------------------------------------------------- 1 | cn 2 | org.cn 3 | ac.cn 4 | mil.cn 5 | net.cn 6 | gov.cn 7 | com.cn 8 | edu.cn 9 | -------------------------------------------------------------------------------- /file-hosts/Domains/china/video-domains: -------------------------------------------------------------------------------- 1 | v9-re1.douyinvod.com.bsclink.cn 2 | video.qq 3 | data.bilivideo 4 | videoplayport-stsdk.vivo.com.cn 5 | videovali-drcn 6 | mpvideo.qpic 7 | video.weibocdn 8 | video.weibo 9 | bilivideo.com 10 | *.bilivideo.com 11 | video.tv 12 | fvideo.gslb.sinaedge.com 13 | f.video.weibocdn.com 14 | video.line 15 | ltsgdty.gtimg.com 16 | pcvideohwyunott.titan.mgtv.com 17 | video.da.mgtv.com 18 | video.da 19 | vali-g1.cp31.ott.cibntv.net 20 | ott.cibntv 21 | act.vip.iqiyi.com 22 | p1-tt-ipv6.byteimg.com 23 | p1-tt.byteimg.com 24 | p16-ad-sg.ibyteimg.com 25 | p16-tiktok-sg.ibyteimg.com 26 | p16-tiktok-sign-va-h2.ibyteimg.com 27 | p16-tiktok-va-h2.ibyteimg.com 28 | p16-tiktok-va.ibyteimg.com 29 | p16-va-tiktok.ibyteimg.com 30 | p26-tt.byteimg.com 31 | p3-tt-ipv6.byteimg.com 32 | p9-tt.byteimg.com 33 | pull-f3-hs.pstatp.com 34 | pull-f5-hs.flive.pstatp.com 35 | pull-f5-hs.pstatp.com 36 | pull-f5-mus.pstatp.com 37 | pull-flv-f1-hs.pstatp.com 38 | pull-flv-f6-hs.pstatp.com 39 | pull-flv-l1-hs.pstatp.com 40 | pull-flv-l1-mus.pstatp.com 41 | pull-flv-l6-hs.pstatp.com 42 | pull-hls-l1-mus.pstatp.com 43 | pull-l3-hs.pstatp.com 44 | pull-rtmp-f1-hs.pstatp.com 45 | pull-rtmp-f6-hs.pstatp.com 46 | pull-rtmp-l1-hs.pstatp.com 47 | pull-rtmp-l1-mus.pstatp.com 48 | pull-rtmp-l6-hs.pstatp.com 49 | -------------------------------------------------------------------------------- /file-hosts/Domains/gfw/Domains: -------------------------------------------------------------------------------- 1 | docker 2 | auth.docker.io 3 | docker.io 4 | registry-1.docker.io 5 | speedtest 6 | cloudflare 7 | tiktokv 8 | tiktokcdn 9 | google 10 | youtube 11 | googlevideo 12 | lala.im 13 | tiktokcdn-us.com 14 | *.tiktokcdn-us.com 15 | wikipedia.org 16 | *.wikipedia.org 17 | telegra.ph 18 | wander.science 19 | dnssec-or-not.com 20 | ghcr.io 21 | private-user-images.githubusercontent.com 22 | store.ubi.com 23 | qianp.com.xkeirofiowef.com 24 | *.tiktokcdn.com 25 | *.tiktokv.com 26 | v19-us.tiktokcdn.com 27 | sf16-sg.tiktokcdn.com 28 | rtlog16-normal-alisg.tiktokv.com 29 | tiktokcdn.com 30 | tiktokv.com 31 | cdn.winget.microsoft.com 32 | xn--ngstr-lra8j.com 33 | ångströ.com 34 | googlevideo.com 35 | sg-hkrpg-api-static.hoyoverse.com 36 | sg-public-data-api.hoyoverse.com 37 | sg-public-api-static.hoyoverse.com 38 | abtest-api-data-sg.hoyoverse.com 39 | cve.mitre.org 40 | cgi.nessus.org 41 | www.securityfocus.com 42 | api.smoot.apple.com 43 | doh.opendns.com 44 | dns.google 45 | dns64.dns.google 46 | dns.google.com 47 | 1dot1dot1dot1.cloudflare-dns.com 48 | dns11.quad9.net 49 | dns.nextdns.io 50 | mozilla.cloudfare-dns.com 51 | chrome.cloudflare-dns.com 52 | e5aehtlc5e.cloudflare-gateway.com 53 | sepfvn6g5a.cloudflare-gateway.com 54 | dns-unfiltered.adguard.com 55 | odoh.cloudflare-dns.com 56 | dns.twnic.tw 57 | doh3.dns.nextdns.io 58 | anycast.dns.nextdns.io 59 | img.kuaibozy.net 60 | displaycatalog.mp.microsoft.com 61 | duckduckgo.com 62 | www.duckduckgo.com 63 | cs.opensource.google 64 | edge.microsoft.com 65 | msedgeextensions.sf.tlu.dl.delivery.mp.microsoft.com 66 | onedrive.live.com 67 | skyapi.onedrive.live.com 68 | logincdn.msauth.ne 69 | login.live.com 70 | acctcdn.msauth.net 71 | account.live.com 72 | gameclipscontent-d2009.xboxlive.com 73 | images-eds.xboxlive.com 74 | xbl-smooth.xboxlive.com 75 | titlehub.xboxlive.com 76 | compass.xboxlive.com 77 | xnotify.xboxlive.com 78 | activityhub.xboxlive.com 79 | xboxcare.xboxlive.com 80 | images-eds-ssl.xboxlive.com 81 | rta.xboxlive.com 82 | peoplehub.xboxlive.com 83 | editorial.xboxlive.com 84 | tlu.dl.delivery.mp.microsoft.com 85 | dl.delivery.mp.microsoft.com 86 | assets1.xboxlive.cn 87 | assets2.xboxlive.cn 88 | rgom10-asus-en.url.trendmicro.com 89 | dreamcast.hk 90 | firebaseinstallations.googleapis.com 91 | tapi.pureapk.com 92 | download.pureapk.com 93 | api.pureapk.com 94 | t.apkpure.net 95 | infinitedata-pa.googleapis.com 96 | geller-pa.googleapis.com 97 | e673.dscx.akamaiedge.net 98 | alt1.mobile-gtalk.l.google.com 99 | alt2.mobile-gtalk4.l.google.com 100 | alt3.mobile-gtalk.l.google.com 101 | alt4.mobile-gtalk4.l.google.com 102 | alt5.mobile-gtalk.l.google.com 103 | alt6.mobile-gtalk4.l.google.com 104 | alt7.mobile-gtalk.l.google.com 105 | alt8.mobile-gtalk4.l.google.com 106 | assets.msn.cn 107 | img-s-msn-com.akamaized.net 108 | translate.google.com 109 | translate.googleapis.com 110 | www3.l.google.com 111 | ap-gae2.spotify.com 112 | ap-guc3.spotify.com 113 | ap-gew1.spotify.com 114 | ap-gew4.spotify.com 115 | ap-gue1.spotify.com 116 | audio-fa.spotifycdn.com 117 | audio-fa.scdn.co 118 | misc.scdn.co 119 | i.scdn.co 120 | newjams-images.scdn.co 121 | dailymix-images.scdn.co 122 | thisis-images.scdn.co 123 | charts-images.scdn.co 124 | seeded-session-images.scdn.co 125 | download.scdn.co 126 | spclient.wg.spotify.com 127 | wg.spotify.com 128 | gae-spclient.spotify.com 129 | audio4-ak-spotify-com.akamaized.net 130 | heads4-ak-spotify-com.akamaized.net 131 | audio-ak-spotify-com.akamaized.net 132 | audio-akp-quic-spotify-com.akamaized.net 133 | gsa.apple.com 134 | is1-ssl.mzstatic.com 135 | is2-ssl.mzstatic.com 136 | is3-ssl.mzstatic.com 137 | is4-ssl.mzstatic.com 138 | is5-ssl.mzstatic.com 139 | aod-ssl.itunes.apple.com 140 | aod.itunes.apple.com 141 | audio.itunes.apple.com 142 | store-032.blobstore.apple.com 143 | store-033.blobstore.apple.com 144 | upos-hz-mirrorakam.akamaized.net 145 | hcaptcha.com 146 | www.hcaptcha.com 147 | assets.hcaptcha.com 148 | imgs.hcaptcha.com 149 | newassets.hcaptcha.com 150 | js.hcaptcha.com 151 | hcaptcha-assets.ecosec.on.epicgames.com 152 | gitlab.com 153 | www.gitlab.com 154 | packages.gitlab.com 155 | page.gitlab.com 156 | support.gitlab.com 157 | customers.gitlab.com 158 | staging.gitlab.com 159 | federal-support.gitlab.com 160 | registry.gitlab.com 161 | levelup.gitlab.com 162 | chef.gitlab.com 163 | pancake.apple.com 164 | pancake.cdn-apple.com.akadns.net 165 | pancake-cn.cdn-apple.com.akadns.net 166 | appledownload.qtlcdn.com 167 | 39-courier.push.apple.com 168 | amp-api-edge.apps.apple.com 169 | configurtion.apple.com 170 | api.weather.com 171 | metrics.icloud.com 172 | bing.com 173 | clientservices.googleapis.com 174 | plus.l.google.com 175 | clients.l.google.com 176 | fonts.googleapis.com 177 | clients2.google.com 178 | a-0001.a-msedge.net 179 | www2.bing.com 180 | login.msa.msidentity.com 181 | mask.icloud.com 182 | mask-h2.icloud.com 183 | m.stripe.network 184 | apkmirror.memberful.com 185 | apkmirror.disqus.com 186 | www.apkmirror.com 187 | winudf.com 188 | ow1.res.office365.com 189 | webshell.suite.office.com 190 | shellprod.msocdn.com 191 | roaming.officeapps.live.com 192 | skydrive.wns.windows.com 193 | oneocsp.microsoft.com 194 | officehomeblobs.blob.core.windows.net 195 | nexusrules.officeapps.live.com 196 | mobile-gtalk.l.google.com 197 | apps.apple.com 198 | apkpure.net 199 | -------------------------------------------------------------------------------- /file-hosts/ad-hosts/ad-ns-hosts: -------------------------------------------------------------------------------- 1 | hongmao520.com 2 | gak38.com 3 | yrc94.com 4 | nyu72.com 5 | tpe76.com 6 | jga45.com 7 | scz32.com 8 | dg847.com 9 | -------------------------------------------------------------------------------- /file-hosts/ad-hosts/adblock: -------------------------------------------------------------------------------- 1 | /adservice/ 2 | /tradplusad/ 3 | /ads.heytap/ 4 | /adx.ads/ 5 | /data.ads/ 6 | /data.ad/ 7 | /adx.ad/ 8 | /dspsdk/ 9 | /dsp-impr2/ 10 | /applogs/ 11 | /dnslogs/ 12 | /dnslog/ 13 | /stun/ 14 | /stun1/ 15 | /frontier100-toutiao-hl/ 16 | /direct.frontier-toutiao-lb-v3.h/ 17 | /orange/ 18 | /pangolin-sdk/ 19 | /bd-p2p/ 20 | /ali-p2p/ 21 | /ali-ad/ 22 | /httpsdns/ 23 | /ad-trace/ 24 | /ad-sdk/ 25 | /ad-scope/ 26 | /httpdns/ 27 | /applog/ 28 | /normal-lf/ 29 | /tnc1/ 30 | /tnc2/ 31 | /tnc4/ 32 | /tnc5/ 33 | /tnc6/ 34 | /tnc7/ 35 | /tnc8/ 36 | /tnc9/ 37 | /tnc10/ 38 | /tnc11/ 39 | /ads5/ 40 | /ads4/ 41 | /ads3/ 42 | /ads2/ 43 | /ads1/ 44 | /tva5/ 45 | /tva4/ 46 | /tva3/ 47 | /tva2/ 48 | /tva1/ 49 | /appimage/ 50 | /toblog/ 51 | /ulogs/ 52 | -------------------------------------------------------------------------------- /file-hosts/ad-hosts/hosts: -------------------------------------------------------------------------------- 1 | kde.qq.con 2 | 420909.cn 3 | *.420909.cn 4 | *.shuzlim.cn 5 | xzsp88x13.xyz 6 | qzonestyle.gtimg.cn 7 | 49518944.com 8 | logic.keke19.com 9 | cache.keke19.com 10 | kkys5.com 11 | kkys6.com 12 | nejb0f.xyz 13 | 9x7dpc.xyz 14 | nncc822d.xyz 15 | sogs5037s.xyz 16 | cpfr619u.xyz 17 | muge906.xyz 18 | 48779851.com 19 | token.safebrowsing.apple 20 | crt.trust-provider.cn.w.kunlunsl.com 21 | crt.trust-provider.cn 22 | apmplus.volces.com 23 | ug-data.mihoyo.com 24 | lens.zhihu.com 25 | *.sugarle.com 26 | findermp.video.qq.com 27 | winterfell.soulapp.cn 28 | insight.soulapp.cn 29 | gateway2-tcp-spam.soulapp.cn 30 | photon-open-api.soulapp.cn 31 | gateway-mobile-gray.soulapp.cn 32 | soul-permanent.soulapp.cn 33 | increase-openapi.soulapp.cn 34 | media-service.soulapp.cn 35 | mos-hw.ilianyue.com 36 | adx-hw.ilianyue.com 37 | api-a.soulapp.cn 38 | fingerprint.soulapp.cn 39 | ib-lq.snssdk.com 40 | reading-lq.snssdk.com 41 | alsc-ug-monitor-callback.alibaba.com 42 | ad.hinavi.net 43 | log.tailscale.io 44 | hot.dev.browser.miui.com 45 | appcfg.v.qq.com 46 | tvepg.pandora.xiaomi.com 47 | urc.io.mi.com 48 | *.pandora.xiaomi.com 49 | finderhwy.video.qq.com 50 | pis-tel-pcdn.youku.com 51 | group-ssl-danmu-ori.youku.com 52 | xpgw-tel-xcdn.youku.com 53 | hudong.alicdn.com 54 | xpgw-xcdn.youku.com 55 | pcclient.download.youku.com 56 | vip.image.video.qpic.cn 57 | flowcontroll.dcdn.sandai.net 58 | wxsnsdythumb.wxs.qq.com 59 | wxsnsdy.wxs.qq.com 60 | *.qc.dolfincdnx.net 61 | sdk.beizi.biz 62 | adx-track.domob.cn 63 | v.adx.hubcloud.com.cn 64 | ali-ad.a.yximgs.com 65 | mobads.baidu.com 66 | sdkoptedge.chinanetcenter.com 67 | bd.pull.yximgs.com 68 | bd-adaptive.pull.yximgs.com 69 | bd-livemate.pull.yximgs.com 70 | bd-origin.pull.yximgs.com 71 | bd-pclivemate.pull.yximgs.com 72 | bd-proxy.pull.yximgs.com 73 | bd-rwk.pull.etoote.com 74 | tx-livemate.pull.yximgs.com 75 | api-htp.beizi.biz 76 | stat.doglobal.net 77 | api.htp.ad-scope.com.cn 78 | goapitell.allmobi.cn 79 | api-es.doglobal.net 80 | dmugc-cn.domobcdn.com 81 | domobcdn.com 82 | mobads-logs.baidu.com 83 | sdktmp.hubcloud.com.cn 84 | pimlog.baidu.com 85 | afd.baidu.com 86 | bdbus-turbonet.baidu.com 87 | adstrategy.biz.weibo.com 88 | bootpreload.uve.weibo.com 89 | kadmimage.biz.weibo.com 90 | vs.biz.weibo.com 91 | blackhole.m.jd.com 92 | fireactive.jd.com 93 | fireactive.jd.com.gslb.qianxun.com 94 | blackhole.m.jd.com.gslb.qianxun.com 95 | appbak.sports.qq.com 96 | lives.l.qq.com 97 | shequbak.sports.qq.com 98 | bv.brg0.com 99 | rlmt.iqiyi.com 100 | gdctyuncdnct.inter.iqiyi.com 101 | gdctyunct.inter.71edge.com 102 | analytics.woozooo.com 103 | settings.ttwebview.com 104 | sdk-data.ubixioe.com 105 | richmanrank.ksedt.com 106 | wetype.weixin.qq.com 107 | wos.58.com 108 | bidex.cn 109 | apptwinkle.ksedt.com 110 | richmanrules.ksedt.com 111 | te.tapdb.net 112 | 60001544.com 113 | 90288385.com 114 | 60001557.com 115 | 60001526.com 116 | vpic.cms.qq.com 117 | webcast5-open-lq.douyin.com 118 | i-lq.snssdk.com 119 | setting.ttwebview.com 120 | is-lq.snssdk.com 121 | cdke.ypudao.com 122 | api-overmind.youdao.com 123 | appconf.mail.163.com 124 | dsp.xiaojukeji.com 125 | orangefire.didistatic.com 126 | dashi.163.com 127 | ydlunacommon-cdn.nosdn.127.net 128 | ydlunacommon-cdn.nos-jd.163yun.com 129 | nex.163.com 130 | lbs.mail.163.com 131 | snowflake.qq.com 132 | trpcdpd.imtt.qq.com 133 | r.release.qq.com 134 | content.rconfig.qq.com 135 | aedns.weixin.qq.com 136 | date.ab.qq.com 137 | report.nfa.qq.com 138 | hd-dev.browser.miui.com 139 | api.dev.browser.miui.com 140 | test.sug.search.miui.srv 141 | preview.security.browser.miui.com 142 | doh.iqiyi.com 143 | etn.076lvo.xyz 144 | tvl.076lvo.xyz 145 | dhx.ruxiangsuisu.cn 146 | js.a.yximgs.com 147 | sc-cdn.dpvs.yximgs.com 148 | lenc.fpsgr.com 149 | u.yonyudong.cn 150 | uty.ddssc.cn 151 | zh.tuikex.xyz 152 | api.jits.heytapmobi.com 153 | duga.zhihu.com 154 | unpkg.zhimg.com 155 | apm.zhihu.com 156 | gecko5-hl.zijieapi.com 157 | is.snssdk.com 158 | msg.71edge.com 159 | aliyuncoccdnct-hz.inter.iqiyi.com 160 | ip.geo.iqiyi.com 161 | app-preload.iqiyi.com 162 | tr.byteurl.cn 163 | reading.snssdk.com 164 | gecko5-lf.zijieapi.com 165 | feedback-c.zijieapi.com 166 | ads3-normal-lf.zijieapi.com 167 | mobilelog.cc.netease.com 168 | mccontacts.mail.163.com 169 | protocol.mail.163.com 170 | gw5bak.chinatelcom.push.mcp.weibo.cn 171 | face.t.sinajs.cn 172 | sinajs.cn 173 | gw5bak.chinamobile.push.mcp.weibo.cn 174 | frontier-toutiao.snssdk.com 175 | hh.zhhbqg.com 176 | njmr.bsdgjmy.com 177 | iv.nsrbz.com 178 | log.aispeech.com 179 | ddy11.fdsfxaf.com 180 | a1.xnvhdjfh.com 181 | ddy13.fdsafcx2.xyz 182 | l4.xhfjcf.net 183 | t1.urjxfs.xyz 184 | t2.urjxfs.com 185 | l1.sjffssje.com 186 | ddy5.fsdrr2dfds.com 187 | 14.uy578xjhf.com 188 | as12.r5jcjgcjs.com 189 | ddy16.8gdf6g5df.xyz 190 | ddy7.fjsldfas.xyz 191 | ddy6.fsdrdfds.com 192 | ddy15.bhdd6g5df.net 193 | ddy12.fdsfxa.com 194 | ddy9.fjsldfas.com 195 | ddy1.npijd6g5df.com 196 | ddy2.ncnfjasd.net 197 | o1.oxj8hcfg.com 198 | l1.oxj8hcfg.xyz 199 | ddy3.fsdsf8gh.xyz 200 | m1.qsfd6g5c.com 201 | ddy14.fdsafcx2.com 202 | s3.xnbjnd7nc.com 203 | www.anidx5m.cc 204 | h1.xjjdfreds.com 205 | *.fsdcvi8.net 206 | *.ddy8.fsdcvi8.net 207 | ddy10.fgxv2df.com 208 | *.qeds6gfh.com 209 | *.ddy10.fgxv2df.com 210 | *.p1.qeds6gfh.com 211 | *.s2.xnbjnd7nc.net 212 | *.h1.xjjdfreds.com 213 | *.ddy4.fsdrrii8.com 214 | s2.xnbjnd7nc.net 215 | ddy8.fsdcvi8.net 216 | www.053h94.com 217 | dfhdsi.cc 218 | dl.kmznz.com 219 | ddy4.fsdrrii8.com 220 | jm.dtyd.com.cn 221 | a.cadei.org.cn 222 | aaa.ktjmjry.cn 223 | www.anion4a.cc 224 | id.fmcra.com 225 | skdjfks.oss-accelerate.aliyuncs.com 226 | hxdl.owxwdra.cn 227 | dl.yangfuquan.com 228 | bw.bxoht.com 229 | pc.stgowan.com 230 | br.bendan.shop 231 | wor.hnzzff.club 232 | jiarui666.cn 233 | us.eyugz66.xyz 234 | hd30.jiarui666.cn 235 | zh.eyugz66.xyz 236 | imdk.paxski.com 237 | u.sishujy.cn 238 | eyugz66.xyz 239 | i-hl.snssdk.com 240 | br.51fa.shop 241 | mon.snssdk.com 242 | omgid.qq.com 243 | vc.qpic.cn 244 | rpt.gdt.qq.com 245 | rmonitor.qq.com 246 | o2o-ad-clicking.alibaba.com 247 | tytx.m.cn.miaozhen.com 248 | v2.reachmax.cn 249 | xs.gdt.qq.com 250 | tmfmazuhttp-wangka.m.qq.com 251 | imp.ad.xelements.cn 252 | access.if.iqiyi.com 253 | qchannel03.cn 254 | pdl.ixelrsd.cn 255 | krg.wxdqgmr.cn 256 | gnrty.kmjkwe.xyz 257 | hnr.svdpgmt.cn 258 | hnr.scjpqut.cn 259 | kmmber.jmnwafa.xyz 260 | kmr.mjnbrt.xyz 261 | kmr.wdjptto.cn 262 | cdsxaz02.xyz 263 | hvr.tjkfcnn.cn 264 | hnr.wsacjdg.cn 265 | shk.jkjoiij.cn 266 | ctyuncdnct.inter.iqiyi.com 267 | flux.iqiyi.com 268 | bar-i.iqiyi.com 269 | qiniucdnct.inter.iqiyi.com 270 | newstreamcdnct.inter.iqiyi.com 271 | mbd.baidu.com 272 | hpd.baidu.com 273 | aidatatest.zhihu.com 274 | qiman57.com 275 | sixmh7.com 276 | kumw5.com 277 | scriptmh.com 278 | p3-passport.byteacctimg.com 279 | log.aldwx.com 280 | www.555yy3.com 281 | www.01412900.com 282 | ugc.hitv.com 283 | www.dadatuwz.com 284 | jd.vg 285 | yyhgames.com 286 | sakurajs2.xonlines.com 287 | www.gllmh8.com 288 | www.gllgs.com 289 | -------------------------------------------------------------------------------- /file-hosts/ad-hosts/test-trli-dns.txt: -------------------------------------------------------------------------------- 1 | ||test.trli.club^$dnsrewrite=NOERROR;CNAME;home-all.trli.club 2 | ||test4.trli.club^$dnsrewrite=NOERROR;CNAME;home-ddns-ipv4.trli.club 3 | ||test6.trli.club^$dnsrewrite=NOERROR;CNAME;home-ddns-ipv6.trli.club 4 | -------------------------------------------------------------------------------- /file-hosts/allow/adblock: -------------------------------------------------------------------------------- 1 | /adaptive.pull.yximgs/ 2 | /game.push.yximgs/ 3 | /static.yximgs/ 4 | /a.yximgs/ 5 | /ec5-core-lf/ 6 | /ec4-core-lf/ 7 | /ec3-core-lf/ 8 | /ec2-core-lf/ 9 | /ec1-core-lf/ 10 | /push-rtmp-vr/ 11 | /push-rtmp/ 12 | /epoch-cn/ 13 | /ec3-core-hl/ 14 | /ec4-core-hl/ 15 | /ec5-core-hl/ 16 | /ec2-core-hl/ 17 | /ec1-core-hl/ 18 | /micloud.xiaomi/ 19 | /pro.kskwai/ 20 | /api-js.gifshow/ 21 | /center.ksapisrv/ 22 | /aio.ecombdimg/ 23 | /cm-sign.ecombdimg/ 24 | /item.ecombdimg/ 25 | /drcn.dbankcloud/ 26 | /things.dbankcloud/ 27 | /dt.dbankcloud/ 28 | /cloud.dbankcloud/ 29 | /platform.dbankcloud/ 30 | /appimg2.dbankcdn/ 31 | /drcn.dbankcdn/ 32 | /aliec2/ 33 | /qqchannel/ 34 | /qqgroup/ 35 | /groupprohead/ 36 | /bot.heytapmobi/ 37 | /dc.oppo/ 38 | /cn.heytap/ 39 | /api.ksapisrv/ 40 | /api-idc.ksapisrv/ 41 | /apps.oppo/ 42 | /dc.heytap/ 43 | /3-normal/ 44 | /4-normal/ 45 | /5-normal/ 46 | /2-normal/ 47 | /1-normal/ 48 | /*.fanqienovel/ 49 | /3-misc-lq/ 50 | /2-misc-lq/ 51 | /1-misc-lq/ 52 | /4-misc-lq/ 53 | /5-misc-lq/ 54 | /uc.heytap/ 55 | /sms.heytap/ 56 | /game.heytap/ 57 | /sec.heytap/ 58 | /tw.heytap/ 59 | /open.heytap/ 60 | /img.heytap/ 61 | /zine.heytap/ 62 | /feeds.heytap/ 63 | /iot.heytap/ 64 | /allawn/ 65 | -------------------------------------------------------------------------------- /file-hosts/allow/dns-domains.txt: -------------------------------------------------------------------------------- 1 | *.dns.yandex.net 2 | cloudflare-dns.com 3 | doh.360.cn 4 | dot.360.cn 5 | doh.dns.apple.com.v.aaplimg.com 6 | doh.dns.apple.com 7 | dns.adguard.com 8 | dns-unfiltered.adguard.com 9 | adguard-dns.com 10 | dns.alidns.com 11 | dot.pub 12 | doh.pub 13 | dns64.cloudflare-dns.com 14 | firefox.dns.nextdns.io 15 | doh.opendns.com 16 | dns.google 17 | dns64.dns.google 18 | dns.google.com 19 | dns11.quad9.net 20 | dns.nextdns.io 21 | dns-unfiltered.adguard.com 22 | unfiltered.adguard-dns.com 23 | dns.twnic.tw 24 | doh3.dns.nextdns.io 25 | anycast.dns.nextdns.io 26 | -------------------------------------------------------------------------------- /file-hosts/dns-china.txt: -------------------------------------------------------------------------------- 1 | #https://alidns.com/knowledge?type=SETTING_DOCS#company_doh 2 | https://dns.alidns.com/dns-query 3 | tls://dns.alidns.com:853 4 | h3://dns.alidns.com/dns-query 5 | h3://223.5.5.5/dns-query 6 | h3://223.6.6.6/dns-query 7 | https://223.5.5.5/dns-query 8 | https://223.6.6.6/dns-query 9 | tls://223.5.5.5:853 10 | tls://223.6.6.6:853 11 | quic://dns.alidns.com:853 12 | quic://223.5.5.5:853 13 | quic://223.6.6.6:853 14 | 15 | #https://docs.dnspod.cn/public-dns/public-dns-illustrate/ 16 | https://doh.pub/dns-query 17 | https://dns.pub/dns-query 18 | https://sm2.doh.pub/dns-query 19 | https://1.12.12.12/dns-query 20 | https://120.53.53.53/dns-query 21 | tls://dns.pub:853 22 | tls://dot.pub:853 23 | tls://1.12.12.12:853 24 | tls://120.53.53.53:853 25 | 26 | #https://sdns.360.net/dnsPublic.html 27 | https://doh.360.cn/dns-query 28 | tls://dot.360.cn:853 29 | tls://101.198.198.198:853 30 | tls://101.198.199.200:853 31 | 32 | #https://www.onedns.net/personal 33 | https://doh-pure.onedns.net/dns-query 34 | tls://dot-pure.onedns.net:853 35 | -------------------------------------------------------------------------------- /file-hosts/gfwlist2agh_modify/gfwlist2agh_modify_final.txt: -------------------------------------------------------------------------------- 1 | (*&*)com.cn 2 | (@%!)18-courier.push.apple.com 3 | (@%!)301.sh 4 | (@%!)alibabadns.com 5 | (@%!)amp-api-edge.music.apple.com 6 | (@%!)apple-dns.cn 7 | (@%!)apple-dns.net 8 | (@%!)apple.com 9 | (@%!)apple.com.cn 10 | (@%!)apps.mzstatic.com.mwcname.com 11 | (@%!)b-b.win 12 | (@%!)beian.gov.cn 13 | (@%!)cl3.apple.com.mwcname.com 14 | (@%!)cl5.apple.com.mwcname.com 15 | (@%!)client-api.itunes.apple.com.mwcname.com 16 | (@%!)cn.bing.com 17 | (@%!)cn.bing.net 18 | (@%!)cname.vercel-dns.com 19 | (@%!)dns.alidns.com 20 | (@%!)dns.pub 21 | (@%!)doh.pub 22 | (@%!)dot.pub 23 | (@%!)douyincdn.com 24 | (@%!)g.cn 25 | (@%!)global-ict.cn 26 | (@%!)global-idc.net 27 | (@%!)global-idt.net 28 | (@%!)google.cn 29 | (@%!)gov.cn 30 | (@%!)gsa.apple.com.akadns.net 31 | (@%!)gstatic.cn 32 | (@%!)hi-res.net.cn 33 | (@%!)icloud.com 34 | (@%!)init-p01md.apple.com 35 | (@%!)init-p01md.apple.com.mwcname.com 36 | (@%!)init.ess.apple.com 37 | (@%!)init.itunes.apple.com 38 | (@%!)init.itunes.apple.com.mwcname.com 39 | (@%!)iphone-ld.apple.com.mwcname.com 40 | (@%!)it-global.cn 41 | (@%!)it-global.xyz 42 | (@%!)jamcz.com 43 | (@%!)jimmyshjj.top 44 | (@%!)mcdn.bilivideo.cn 45 | (@%!)mesu.apple.com.mwcname.com 46 | (@%!)mobilegw.alipay.com 47 | (@%!)paypal.com 48 | (@%!)paypalobjects.com 49 | (@%!)pd.itunes.apple.com.mwcname.com 50 | (@%!)play.itunes.apple.com.mwcname.com 51 | (@%!)se-edge.itunes-apple.com 52 | (@%!)se-edge.itunes.apple.com.mwcname.com 53 | (@%!)search.itunes.apple.com.mwcname.com 54 | (@%!)securemetrics.apple.com.cn 55 | (@%!)ssnm.xyz 56 | (@%!)uc.cn 57 | (@%!)vercel.com 58 | (@%!)www-cdn.icloud.com.akadns.net 59 | (@%!)www.apple.com.cn 60 | (@%!)www.beian.gov.cn 61 | (@%!)www.bing.com 62 | (@%!)www.icloud.com 63 | (@%!)xssx.win 64 | (@%!)yuanshen.com 65 | (@&!)1dot1dot1dot1.cloudflare-dns.com 66 | (@&!)adminforge.de 67 | (@&!)anidb.net 68 | (@&!)app.smartsheet.com 69 | (@&!)archive.fastgit.org 70 | (@&!)assets.fanart.tv 71 | (@&!)assets.fastgit.org 72 | (@&!)bbs.acgrip.com 73 | (@&!)bing.com 74 | (@&!)cdn.jsdelivr.net 75 | (@&!)cityline.com 76 | (@&!)cloudflare-dns.com 77 | (@&!)customer-stories-feed.fastgit.org 78 | (@&!)dash.cloudflare.com 79 | (@&!)denpasoft.com 80 | (@&!)desktop.githubusercontent.com 81 | (@&!)dns.cloudflare.com 82 | (@&!)dns.google 83 | (@&!)dns.opendns.com 84 | (@&!)dockerproxy.com 85 | (@&!)doh.opendns.com 86 | (@&!)download.fastgit.org 87 | (@&!)fanart.tv 88 | (@&!)fastgit.org 89 | (@&!)froth.zone 90 | (@&!)funami.tech 91 | (@&!)github.com 92 | (@&!)githubusercontent.com 93 | (@&!)google.com 94 | (@&!)googleads.g.doubleclick.net 95 | (@&!)hardwarezone.com.sg 96 | (@&!)hellotalk.com 97 | (@&!)hub.fastgit.org 98 | (@&!)jing.rocks 99 | (@&!)jotform.com 100 | (@&!)jsdelivr.net 101 | (@&!)library.ac.cn 102 | (@&!)miro.com 103 | (@&!)privacyredirect.com 104 | (@&!)r4fo.com 105 | (@&!)raw.fastgit.org 106 | (@&!)redirector.googlevideo.com 107 | (@&!)service-now.com 108 | (@&!)share.acgnx.net 109 | (@&!)share.acgnx.se 110 | (@&!)slate.com 111 | (@&!)smartsheet.com 112 | (@&!)uupdump.net 113 | (@&!)workers.dev 114 | (@&!)www.acgnx.se 115 | (@&!)www.anix.moe 116 | (@&!)www.bing.com 117 | (@&!)zhijie.online 118 | -------------------------------------------------------------------------------- /file/Ydns/ydns-ddns.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # https://ydns.io 域名解析,双域名版,by:小贝塔 3 | 4 | YDNS_USER="邮箱" 5 | YDNS_PASSWD="密钥" 6 | YDNS_HOST4="域名4" 7 | YDNS_HOST6="域名6" 8 | 9 | # 定义解析函数 10 | ddns(){ 11 | curl -u "$YDNS_USER:$YDNS_PASSWD" https://ydns.io/api/v1/update/?host=${1}\&ip=${2} 12 | } 13 | 14 | # ipv4 15 | ipv4=$(curl -s https://v4.ident.me) 16 | ip4=123 17 | if [ ${ipv4} != ${ip4} ]; then 18 | ddns $YDNS_HOST4 $ipv4 19 | sed -i "s/^ip4=.*/ip4=${ipv4}/" "$0" 20 | fi 21 | 22 | # ipv6 23 | ipv6=$(curl -s https://v6.ident.me) 24 | ip6=240e:345:4d15:3600:d967:d60d:cc9a:1592 25 | if [ ${ipv6} != ${ip6} ]; then 26 | ddns $YDNS_HOST6 $ipv6 27 | sed -i "s/^ip6=.*/ip6=${ipv6}/" "$0" 28 | fi 29 | -------------------------------------------------------------------------------- /file/aria2/tracker.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # https://github.com/P3TERX/aria2.conf 4 | # File name:tracker.sh 5 | # Description: Get BT trackers and add to Aria2 6 | # Version: 3.1 7 | # 8 | # Copyright (c) 2018-2021 P3TERX 9 | # 10 | # Permission is hereby granted, free of charge, to any person obtaining a copy 11 | # of this software and associated documentation files (the "Software"), to deal 12 | # in the Software without restriction, including without limitation the rights 13 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | # copies of the Software, and to permit persons to whom the Software is 15 | # furnished to do so, subject to the following conditions: 16 | # 17 | # The above copyright notice and this permission notice shall be included in all 18 | # copies or substantial portions of the Software. 19 | # 20 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | # SOFTWARE. 27 | # 28 | # BT tracker is provided by the following project. 29 | # https://github.com/XIU2/TrackersListCollection 30 | # 31 | # Fallback URLs provided by jsDelivr 32 | # https://www.jsdelivr.com 33 | # 34 | 35 | RED_FONT_PREFIX="\033[31m" 36 | GREEN_FONT_PREFIX="\033[32m" 37 | YELLOW_FONT_PREFIX="\033[1;33m" 38 | LIGHT_PURPLE_FONT_PREFIX="\033[1;35m" 39 | FONT_COLOR_SUFFIX="\033[0m" 40 | INFO="[${GREEN_FONT_PREFIX}INFO${FONT_COLOR_SUFFIX}]" 41 | ERROR="[${RED_FONT_PREFIX}ERROR${FONT_COLOR_SUFFIX}]" 42 | ARIA2_CONF=${1:-aria2.conf} 43 | DOWNLOADER="curl -fsSL --connect-timeout 3 --max-time 3 --retry 2" 44 | NL=$'\n' 45 | 46 | DATE_TIME() { 47 | date +"%m/%d %H:%M:%S" 48 | } 49 | 50 | GET_TRACKERS() { 51 | 52 | if [[ -z "${CUSTOM_TRACKER_URL}" ]]; then 53 | echo && echo -e "$(DATE_TIME) ${INFO} Get BT trackers..." 54 | TRACKER=$( 55 | ${DOWNLOADER} https://raw.githubusercontent.com/hezhijie0327/Trackerslist/main/trackerslist_combine_aria2.txt || 56 | ${DOWNLOADER} https://raw.githubusercontent.com/hezhijie0327/Trackerslist/main/trackerslist_exclude_aria2.txt || 57 | ${DOWNLOADER} https://raw.githubusercontent.com/hezhijie0327/Trackerslist/main/trackerslist_tracker_aria2.txt 58 | ) 59 | else 60 | echo && echo -e "$(DATE_TIME) ${INFO} Get BT trackers from url(s):${CUSTOM_TRACKER_URL} ..." 61 | URLS=$(echo ${CUSTOM_TRACKER_URL} | tr "," "$NL") 62 | for URL in $URLS; do 63 | TRACKER+="$(${DOWNLOADER} ${URL} | tr "," "\n")$NL" 64 | done 65 | TRACKER="$(echo "$TRACKER" | awk NF | sort -u | sed 'H;1h;$!d;x;y/\n/,/' )" 66 | fi 67 | 68 | [[ -z "${TRACKER}" ]] && { 69 | echo 70 | echo -e "$(DATE_TIME) ${ERROR} Unable to get trackers, network failure or invalid links." && exit 1 71 | } 72 | } 73 | 74 | ECHO_TRACKERS() { 75 | echo -e " 76 | --------------------[BitTorrent Trackers]-------------------- 77 | ${TRACKER} 78 | --------------------[BitTorrent Trackers]-------------------- 79 | " 80 | } 81 | 82 | ADD_TRACKERS() { 83 | echo -e "$(DATE_TIME) ${INFO} Adding BT trackers to Aria2 configuration file ${LIGHT_PURPLE_FONT_PREFIX}${ARIA2_CONF}${FONT_COLOR_SUFFIX} ..." && echo 84 | if [ ! -f ${ARIA2_CONF} ]; then 85 | echo -e "$(DATE_TIME) ${ERROR} '${ARIA2_CONF}' does not exist." 86 | exit 1 87 | else 88 | [ -z $(grep "bt-tracker=" ${ARIA2_CONF}) ] && echo "bt-tracker=" >>${ARIA2_CONF} 89 | sed -i "s@^\(bt-tracker=\).*@\1${TRACKER}@" ${ARIA2_CONF} && echo -e "$(DATE_TIME) ${INFO} BT trackers successfully added to Aria2 configuration file !" 90 | fi 91 | } 92 | 93 | ADD_TRACKERS_RPC() { 94 | if [[ "${RPC_SECRET}" ]]; then 95 | RPC_PAYLOAD='{"jsonrpc":"2.0","method":"aria2.changeGlobalOption","id":"P3TERX","params":["token:'${RPC_SECRET}'",{"bt-tracker":"'${TRACKER}'"}]}' 96 | else 97 | RPC_PAYLOAD='{"jsonrpc":"2.0","method":"aria2.changeGlobalOption","id":"P3TERX","params":[{"bt-tracker":"'${TRACKER}'"}]}' 98 | fi 99 | curl "${RPC_ADDRESS}" -fsSd "${RPC_PAYLOAD}" || curl "https://${RPC_ADDRESS}" -kfsSd "${RPC_PAYLOAD}" 100 | } 101 | 102 | ADD_TRACKERS_RPC_STATUS() { 103 | RPC_RESULT=$(ADD_TRACKERS_RPC) 104 | [[ $(echo ${RPC_RESULT} | grep OK) ]] && 105 | echo -e "$(DATE_TIME) ${INFO} BT trackers successfully added to Aria2 !" || 106 | echo -e "$(DATE_TIME) ${ERROR} Network failure or Aria2 RPC interface error!" 107 | } 108 | 109 | ADD_TRACKERS_REMOTE_RPC() { 110 | echo -e "$(DATE_TIME) ${INFO} Adding BT trackers to remote Aria2: ${LIGHT_PURPLE_FONT_PREFIX}${RPC_ADDRESS%/*}${FONT_COLOR_SUFFIX} ..." && echo 111 | ADD_TRACKERS_RPC_STATUS 112 | } 113 | 114 | ADD_TRACKERS_LOCAL_RPC() { 115 | if [ ! -f ${ARIA2_CONF} ]; then 116 | echo -e "$(DATE_TIME) ${ERROR} '${ARIA2_CONF}' does not exist." 117 | exit 1 118 | else 119 | RPC_PORT=$(grep ^rpc-listen-port ${ARIA2_CONF} | cut -d= -f2-) 120 | RPC_SECRET=$(grep ^rpc-secret ${ARIA2_CONF} | cut -d= -f2-) 121 | [[ ${RPC_PORT} ]] || { 122 | echo -e "$(DATE_TIME) ${ERROR} Aria2 configuration file incomplete." 123 | exit 1 124 | } 125 | RPC_ADDRESS="localhost:${RPC_PORT}/jsonrpc" 126 | echo -e "$(DATE_TIME) ${INFO} Adding BT trackers to Aria2 ..." && echo 127 | ADD_TRACKERS_RPC_STATUS 128 | fi 129 | } 130 | 131 | [ $(command -v curl) ] || { 132 | echo -e "$(DATE_TIME) ${ERROR} curl is not installed." 133 | exit 1 134 | } 135 | 136 | if [ "$1" = "cat" ]; then 137 | GET_TRACKERS 138 | ECHO_TRACKERS 139 | elif [ "$1" = "RPC" ]; then 140 | RPC_ADDRESS="$2/jsonrpc" 141 | RPC_SECRET="$3" 142 | GET_TRACKERS 143 | ECHO_TRACKERS 144 | ADD_TRACKERS_REMOTE_RPC 145 | elif [ "$2" = "RPC" ]; then 146 | GET_TRACKERS 147 | ECHO_TRACKERS 148 | ADD_TRACKERS 149 | echo 150 | ADD_TRACKERS_LOCAL_RPC 151 | else 152 | GET_TRACKERS 153 | ECHO_TRACKERS 154 | ADD_TRACKERS 155 | fi 156 | 157 | exit 0 158 | -------------------------------------------------------------------------------- /file/bash/git-rm.sh: -------------------------------------------------------------------------------- 1 | #回收内存 2 | #里面最重要的两条命令是 git filter-branch 和 gc, filter-branch 真正在清理,但是只运行它也是没用的,需要再删除备份的文件,重新打包之类的,最后的gc命令,用来收集产生的垃圾,最终清除大文件。 3 | #https://zhuanlan.zhihu.com/p/377661967 4 | rm -rf .git/refs/original/ 5 | git reflog expire --expire=now --all 6 | git fsck --full --unreachable 7 | git repack -A -d 8 | git gc --aggressive --prune=now -------------------------------------------------------------------------------- /file/bash/github-dns.sh: -------------------------------------------------------------------------------- 1 | sudo sed -i 's/#DNS=/DNS=1.1.1.1 1.0.0.1/g' /etc/systemd/resolved.conf 2 | sudo systemctl daemon-reload 3 | sudo systemctl restart systemd-networkd 4 | sudo systemctl restart systemd-resolved 5 | sudo prlimit --pid $$ --nofile=500000:500000 6 | ulimit -a 7 | sudo apt-get -qq update 8 | sudo apt reinstall curl git libnss3* ca-certificates grep findutils -y 9 | sudo apt-get install -y parallel mawk fd-find 10 | -------------------------------------------------------------------------------- /file/clang-build/.gitignore: -------------------------------------------------------------------------------- 1 | /.idea/ 2 | /build/ 3 | /venv/ 4 | *.pyc 5 | -------------------------------------------------------------------------------- /file/clang-build/.style.yapf: -------------------------------------------------------------------------------- 1 | [style] 2 | based_on_style = pep8 3 | column_limit = 100 4 | -------------------------------------------------------------------------------- /file/clang-build/build-binutils.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # pylint: disable=invalid-name 3 | 4 | from argparse import ArgumentParser 5 | from pathlib import Path 6 | import time 7 | 8 | import tc_build.binutils 9 | import tc_build.utils 10 | 11 | LATEST_BINUTILS_RELEASE = (2, 41, 0) 12 | 13 | parser = ArgumentParser() 14 | parser.add_argument('-B', 15 | '--binutils-folder', 16 | help=''' 17 | By default, the script will download a copy of the binutils source in the src folder within 18 | the same folder as this script. If you have your own copy of the binutils source that you 19 | would like to build from, pass it to this parameter. It can be either an absolute or 20 | relative path. 21 | ''', 22 | type=str) 23 | parser.add_argument('-b', 24 | '--build-folder', 25 | help=''' 26 | By default, the script will create a "build/binutils" folder in the same folder as this 27 | script then build each target in its own folder within that containing folder. If you 28 | would like the containing build folder to be somewhere else, pass it to this parameter. 29 | that done somewhere else, pass it to this parameter. It can be either an absolute or 30 | relative path. 31 | ''', 32 | type=str) 33 | parser.add_argument('-i', 34 | '--install-folder', 35 | help=''' 36 | By default, the script will build binutils but stop before installing it. To install 37 | them into a prefix, pass it to this parameter. This can be either an absolute or 38 | relative path. 39 | ''', 40 | type=str) 41 | parser.add_argument('-m', 42 | '--march', 43 | metavar='ARCH', 44 | help=''' 45 | Add -march=ARCH to CFLAGS to optimize the toolchain for the processor that it will be 46 | running on. 47 | ''', 48 | type=str) 49 | parser.add_argument('--show-build-commands', 50 | help=''' 51 | By default, the script only shows the output of the comands it is running. When this option 52 | is enabled, the invocations of configure and make will be shown to help with reproducing 53 | issues outside of the script. 54 | ''', 55 | action='store_true') 56 | parser.add_argument('-t', 57 | '--targets', 58 | help=''' 59 | The script can build binutils targeting arm-linux-gnueabi, aarch64-linux-gnu, 60 | mips-linux-gnu, mipsel-linux-gnu, powerpc-linux-gnu, powerpc64-linux-gnu, 61 | powerpc64le-linux-gnu, riscv64-linux-gnu, s390x-linux-gnu, and x86_64-linux-gnu. 62 | 63 | By default, it builds all supported targets ("all"). If you would like to build 64 | specific targets only, pass them to this script. It can be either the full target 65 | or just the first part (arm, aarch64, x86_64, etc). 66 | ''', 67 | nargs='+') 68 | args = parser.parse_args() 69 | 70 | script_start = time.time() 71 | 72 | tc_build_folder = Path(__file__).resolve().parent 73 | 74 | bsm = tc_build.binutils.BinutilsSourceManager() 75 | if args.binutils_folder: 76 | bsm.location = Path(args.binutils_folder).resolve() 77 | if not bsm.location.exists(): 78 | raise RuntimeError(f"Provided binutils source ('{bsm.location}') does not exist?") 79 | else: 80 | # Turns (2, 40, 0) into 2.40 and (2, 40, 1) into 2.40.1 to follow tarball names 81 | folder_name = 'binutils-' + '.'.join(str(x) for x in LATEST_BINUTILS_RELEASE if x) 82 | 83 | bsm.location = Path(tc_build_folder, 'src', folder_name) 84 | bsm.tarball.base_download_url = 'https://sourceware.org/pub/binutils/releases' 85 | bsm.tarball.local_location = bsm.location.with_name(f"{folder_name}.tar.xz") 86 | bsm.tarball_remote_checksum_name = 'sha512.sum' 87 | bsm.prepare() 88 | 89 | if args.build_folder: 90 | build_folder = Path(args.build_folder).resolve() 91 | else: 92 | build_folder = Path(tc_build_folder, 'build/binutils') 93 | 94 | default_targets = bsm.default_targets() 95 | if args.targets: 96 | targets = default_targets if 'all' in args.targets else set(args.targets) 97 | else: 98 | targets = default_targets 99 | 100 | targets_to_builder = { 101 | 'arm': tc_build.binutils.ArmBinutilsBuilder, 102 | 'aarch64': tc_build.binutils.AArch64BinutilsBuilder, 103 | 'mips': tc_build.binutils.MipsBinutilsBuilder, 104 | 'mipsel': tc_build.binutils.MipselBinutilsBuilder, 105 | 'powerpc': tc_build.binutils.PowerPCBinutilsBuilder, 106 | 'powerpc64': tc_build.binutils.PowerPC64BinutilsBuilder, 107 | 'powerpc64le': tc_build.binutils.PowerPC64LEBinutilsBuilder, 108 | 'riscv64': tc_build.binutils.RISCV64BinutilsBuilder, 109 | 's390x': tc_build.binutils.S390XBinutilsBuilder, 110 | 'x86_64': tc_build.binutils.X8664BinutilsBuilder, 111 | } 112 | if 'loongarch64' in default_targets: 113 | targets_to_builder['loongarch64'] = tc_build.binutils.LoongArchBinutilsBuilder 114 | for item in targets: 115 | target = item.split('-', maxsplit=1)[0] 116 | if target in targets_to_builder: 117 | builder = targets_to_builder[target]() 118 | builder.folders.build = Path(build_folder, target) 119 | if args.install_folder: 120 | builder.folders.install = Path(args.install_folder).resolve() 121 | builder.folders.source = bsm.location 122 | if args.march: 123 | builder.cflags.append(f"-march={args.march}") 124 | # -march implies -mtune except for x86-64-v{2,3,4}, which are 125 | # documented to imply -mtune=generic. If the user has requested one 126 | # of these values, it is a safe assumption they only care about 127 | # running on their machine, so add -mtune=native to further 128 | # optimize the toolchain for their machine. 129 | if 'x86-64-v' in args.march: 130 | builder.cflags.append('-mtune=native') 131 | builder.show_commands = args.show_build_commands 132 | builder.build() 133 | else: 134 | tc_build.utils.print_warning(f"Unsupported target ('{target}'), ignoring...") 135 | 136 | print(f"\nTotal script duration: {tc_build.utils.get_duration(script_start)}") -------------------------------------------------------------------------------- /file/clang-build/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -eo pipefail 4 | 5 | # Function to show an informational message 6 | function msg() { 7 | echo -e "\e[1;32m$@\e[0m" 8 | } 9 | 10 | # Don't touch repo if running on CI 11 | [ -z "$GH_RUN_ID" ] && repo_flag="--shallow-clone" || repo_flag="--no-update" 12 | 13 | # Build LLVM 14 | msg "Building LLVM..." 15 | ./build-llvm.py -D \ 16 | LLVM_PARALLEL_COMPILE_JOBS=$(nproc) \ 17 | LLVM_PARALLEL_LINK_JOBS=$(nproc) \ 18 | --targets "ARM;AArch64;X86" \ 19 | "$repo_flag" \ 20 | --pgo kernel-defconfig \ 21 | --lto full 22 | 23 | 24 | # Build binutils 25 | msg "Building binutils..." 26 | ./build-binutils.py --targets arm aarch64 x86_64 27 | 28 | # Remove unused products 29 | msg "Removing unused products..." 30 | rm -fr install/include 31 | rm -f install/lib/*.a install/lib/*.la 32 | 33 | # Strip remaining products 34 | msg "Stripping remaining products..." 35 | for f in $(find install -type f -exec file {} \; | grep 'not stripped' | awk '{print $1}'); do 36 | strip ${f: : -1} 37 | done 38 | 39 | # Set executable rpaths so setting LD_LIBRARY_PATH isn't necessary 40 | msg "Setting library load paths for portability..." 41 | for bin in $(find install -mindepth 2 -maxdepth 3 -type f -exec file {} \; | grep 'ELF .* interpreter' | awk '{print $1}'); do 42 | # Remove last character from file output (':') 43 | bin="${bin: : -1}" 44 | 45 | echo "$bin" 46 | patchelf --set-rpath '$ORIGIN/../lib' "$bin" 47 | done 48 | -------------------------------------------------------------------------------- /file/clang-build/ruff.toml: -------------------------------------------------------------------------------- 1 | # https://beta.ruff.rs/docs/rules/ 2 | select = [ 3 | 'A', # flake8-builtins 4 | 'ARG', # flake8-unused-arguments 5 | 'B', # flake8-bugbear 6 | 'C4', # flake8-comprehensions 7 | 'E', # pycodestyle 8 | 'F', # pyflakes 9 | 'PIE', # flake8-pie 10 | 'PL', # pylint 11 | 'PTH', # flake8-use-pathlib 12 | 'RET', # flake8-return 13 | 'RUF', # ruff 14 | 'S', # flake8-bandit 15 | 'SIM', # flake8-simplify 16 | 'SLF', # flake8-self 17 | 'UP', # pyupgrade 18 | 'W', # pycodestyle 19 | ] 20 | ignore = [ 21 | 'E501', # line-too-long 22 | 'PLR0911', # too-many-return-statments 23 | 'PLR0912', # too-many-branches 24 | 'PLR0913', # too-many-arguments 25 | 'PLR0915', # too-many-statements 26 | 'PLR2004', # magic-value-comparison 27 | 'S603', # subprocess-without-shell-equals-true 28 | 'S607', # start-process-with-partial-path 29 | ] 30 | target-version = 'py38' 31 | -------------------------------------------------------------------------------- /file/clang-build/tc_build/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Potterli20/file/d3c78cbb620cdb0e8a039bbdbe0a4516396abe1b/file/clang-build/tc_build/__init__.py -------------------------------------------------------------------------------- /file/clang-build/tc_build/builder.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import shlex 4 | import shutil 5 | import subprocess 6 | 7 | 8 | class Folders: 9 | 10 | def __init__(self): 11 | self.build = None 12 | self.install = None 13 | self.source = None 14 | 15 | 16 | class Builder: 17 | 18 | def __init__(self): 19 | self.folders = Folders() 20 | self.show_commands = False 21 | 22 | def build(self): 23 | raise NotImplementedError 24 | 25 | def clean_build_folder(self): 26 | if not self.folders.build: 27 | raise RuntimeError('No build folder set?') 28 | 29 | if self.folders.build.exists(): 30 | if self.folders.build.is_dir(): 31 | shutil.rmtree(self.folders.build) 32 | else: 33 | self.folders.build.unlink() 34 | 35 | def run_cmd(self, cmd, capture_output=False, cwd=None): 36 | if self.show_commands: 37 | # Acts sort of like 'set -x' in bash 38 | print(f"$ {' '.join([shlex.quote(str(elem)) for elem in cmd])}", flush=True) 39 | return subprocess.run(cmd, capture_output=capture_output, check=True, cwd=cwd) -------------------------------------------------------------------------------- /file/clang-build/tc_build/source.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import hashlib 4 | import re 5 | import subprocess 6 | 7 | import tc_build.utils 8 | 9 | # When doing verification, read 128MiB at a time 10 | BYTES_TO_READ = 131072 11 | 12 | 13 | class Tarball: 14 | 15 | def __init__(self): 16 | self.base_download_url = None 17 | self.local_location = None 18 | self.remote_tarball_name = None 19 | self.remote_checksum_name = '' 20 | 21 | def download(self): 22 | if not self.local_location: 23 | raise RuntimeError('No local tarball location specified?') 24 | if self.local_location.exists(): 25 | return # Already downloaded 26 | 27 | if not self.base_download_url: 28 | raise RuntimeError('No tarball download URL specified?') 29 | if not self.remote_tarball_name: 30 | self.remote_tarball_name = self.local_location.name 31 | 32 | tc_build.utils.curl(f"{self.base_download_url}/{self.remote_tarball_name}", 33 | destination=self.local_location) 34 | 35 | # If there is a remote checksum file, download it, find the checksum 36 | # for the particular tarball, compute the downloaded file's checksum, 37 | # and finally compare the two. 38 | if self.remote_checksum_name: 39 | checksums = tc_build.utils.curl(f"{self.base_download_url}/{self.remote_checksum_name}") 40 | if not (match := re.search( 41 | fr"([0-9a-f]+)\s+{self.remote_tarball_name}$", checksums, flags=re.M)): 42 | raise RuntimeError(f"Could not find checksum for {self.remote_tarball_name}?") 43 | 44 | if 'sha256' in self.remote_checksum_name: 45 | file_hash = hashlib.sha256() 46 | elif 'sha512' in self.remote_checksum_name: 47 | file_hash = hashlib.sha512() 48 | else: 49 | raise RuntimeError( 50 | f"No supported hashlib for {self.remote_checksum_name}, add support for it?") 51 | with self.local_location.open('rb') as file: 52 | while (data := file.read(BYTES_TO_READ)): 53 | file_hash.update(data) 54 | 55 | computed_checksum = file_hash.hexdigest() 56 | expected_checksum = match.groups()[0] 57 | if computed_checksum != expected_checksum: 58 | raise RuntimeError( 59 | f"Computed checksum of {self.local_destination} ('{computed_checksum}') differs from expected checksum ('{expected_checksum}'), remove it and try again?" 60 | ) 61 | 62 | def extract(self, extraction_location): 63 | if not self.local_location: 64 | raise RuntimeError('No local tarball location specified?') 65 | if not self.local_location.exists(): 66 | raise RuntimeError( 67 | f"Local tarball ('{self.local_location}') could not be found, download it first?") 68 | 69 | extraction_location.mkdir(exist_ok=True, parents=True) 70 | tar_cmd = [ 71 | 'tar', 72 | '--auto-compress', 73 | f"--directory={extraction_location}", 74 | '--extract', 75 | f"--file={self.local_location}", 76 | '--strip-components=1', 77 | ] 78 | 79 | tc_build.utils.print_info(f"Extracting {self.local_location} into {extraction_location}...") 80 | subprocess.run(tar_cmd, check=True) 81 | 82 | 83 | class SourceManager: 84 | 85 | def __init__(self, location=None): 86 | self.location = location 87 | self.tarball = Tarball() -------------------------------------------------------------------------------- /file/clang-build/tc_build/tools.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # pylint: disable=invalid-name 3 | 4 | import os 5 | from pathlib import Path 6 | import re 7 | import shutil 8 | import subprocess 9 | 10 | import tc_build.utils 11 | 12 | 13 | class HostTools: 14 | 15 | def __init__(self): 16 | self.cc = self.find_host_cc() 17 | self.cc_is_clang = 'clang' in self.cc.name 18 | 19 | self.ar = self.find_host_ar() 20 | self.cxx = self.find_host_cxx() 21 | self.ld = self.find_host_ld() 22 | self.ranlib = self.find_host_ranlib() 23 | 24 | self.clang_tblgen = None 25 | self.llvm_bolt = None 26 | self.llvm_profdata = None 27 | self.llvm_tblgen = None 28 | self.merge_fdata = None 29 | self.perf2bolt = None 30 | 31 | def find_host_ar(self): 32 | # GNU ar is the default, no need for llvm-ar if using GCC 33 | if not self.cc_is_clang: 34 | return None 35 | 36 | if (ar := Path(self.cc.parent, 'llvm-ar')).exists(): 37 | return ar 38 | 39 | return None 40 | 41 | def find_host_cc(self): 42 | # resolve() is called here and below to get /usr/lib/llvm-#/bin/... for 43 | # versioned LLVM binaries on Debian and Ubuntu. 44 | if (cc := self.from_env('CC')): 45 | return cc.resolve() 46 | 47 | possible_c_compilers = [*self.generate_versioned_binaries(), 'clang', 'gcc'] 48 | for compiler in possible_c_compilers: 49 | if (cc := shutil.which(compiler)): 50 | break 51 | 52 | if not cc: 53 | raise RuntimeError('Neither clang nor gcc could be found on your system?') 54 | 55 | return Path(cc).resolve() # resolve() for Debian/Ubuntu variants 56 | 57 | def find_host_cxx(self): 58 | if (cxx := self.from_env('CXX')): 59 | return cxx 60 | 61 | possible_cxx_compiler = 'clang++' if self.cc_is_clang else 'g++' 62 | 63 | # Use CXX from the 'bin' folder of CC if it exists 64 | if (cxx := Path(self.cc.parent, possible_cxx_compiler)).exists(): 65 | return cxx 66 | 67 | if not (cxx := shutil.which(possible_cxx_compiler)): 68 | raise RuntimeError( 69 | f"CXX ('{possible_cxx_compiler}') could not be found on your system?") 70 | 71 | return Path(cxx) 72 | 73 | def find_host_ld(self): 74 | if (ld := self.from_env('LD')): 75 | return ld 76 | 77 | if self.cc_is_clang: 78 | # First, see if there is an ld.lld installed in the same folder as 79 | # CC; if so, we know it can be used. 80 | if (ld := Path(self.cc.parent, 'ld.lld')).exists(): 81 | return ld 82 | 83 | # If not, try to find a suitable linker via PATH 84 | possible_linkers = ['lld', 'gold', 'bfd'] 85 | for linker in possible_linkers: 86 | if (ld := shutil.which(f"ld.{linker}")): 87 | break 88 | if not ld: 89 | return None 90 | return self.validate_ld(Path(ld)) 91 | 92 | # For GCC, it is only worth testing 'gold' 93 | return self.validate_ld('gold') 94 | 95 | def find_host_ranlib(self): 96 | # GNU ranlib is the default, no need for llvm-ranlib if using GCC 97 | if not self.cc_is_clang: 98 | return None 99 | 100 | if (ranlib := Path(self.cc.parent, 'llvm-ranlib')).exists(): 101 | return ranlib 102 | 103 | return None 104 | 105 | def from_env(self, key): 106 | if key not in os.environ: 107 | return None 108 | 109 | if key == 'LD': 110 | return self.validate_ld(os.environ[key], warn=True) 111 | 112 | if not (tool := shutil.which(os.environ[key])): 113 | raise RuntimeError( 114 | f"{key} value ('{os.environ[key]}') could not be found on your system?") 115 | return Path(tool) 116 | 117 | def generate_versioned_binaries(self): 118 | try: 119 | cmakelists_txt = tc_build.utils.curl( 120 | 'https://raw.githubusercontent.com/llvm/llvm-project/main/llvm/CMakeLists.txt') 121 | except subprocess.CalledProcessError: 122 | llvm_tot_ver = 16 123 | else: 124 | if not (match := re.search(r'set\(LLVM_VERSION_MAJOR\s+(\d+)', cmakelists_txt)): 125 | raise RuntimeError('Could not find LLVM_VERSION_MAJOR in CMakeLists.txt?') 126 | llvm_tot_ver = int(match.groups()[0]) 127 | 128 | return [f'clang-{num}' for num in range(llvm_tot_ver, 6, -1)] 129 | 130 | def show_compiler_linker(self): 131 | print(f"CC: {self.cc}") 132 | print(f"CXX: {self.cxx}") 133 | if self.ld: 134 | if isinstance(self.ld, Path): 135 | print(f"LD: {self.ld}") 136 | else: 137 | ld_to_print = self.ld if 'ld.' in self.ld else f"ld.{self.ld}" 138 | print(f"LD: {shutil.which(ld_to_print)}") 139 | tc_build.utils.flush_std_err_out() 140 | 141 | def validate_ld(self, ld, warn=False): 142 | if not ld: 143 | return None 144 | 145 | cc_cmd = [self.cc, f'-fuse-ld={ld}', '-o', '/dev/null', '-x', 'c', '-'] 146 | try: 147 | subprocess.run(cc_cmd, 148 | capture_output=True, 149 | check=True, 150 | input='int main(void) { return 0; }', 151 | text=True) 152 | except subprocess.CalledProcessError: 153 | if warn: 154 | tc_build.utils.print_warning( 155 | f"LD value ('{ld}') is not supported by CC ('{self.cc}'), ignoring it...") 156 | return None 157 | 158 | return ld 159 | 160 | 161 | class StageTools: 162 | 163 | def __init__(self, bin_folder): 164 | # Used by cmake 165 | self.ar = Path(bin_folder, 'llvm-ar') 166 | self.cc = Path(bin_folder, 'clang') 167 | self.clang_tblgen = Path(bin_folder, 'clang-tblgen') 168 | self.cxx = Path(bin_folder, 'clang++') 169 | self.ld = Path(bin_folder, 'ld.lld') 170 | self.llvm_tblgen = Path(bin_folder, 'llvm-tblgen') 171 | self.ranlib = Path(bin_folder, 'llvm-ranlib') 172 | # Used by the builder 173 | self.llvm_bolt = Path(bin_folder, 'llvm-bolt') 174 | self.llvm_profdata = Path(bin_folder, 'llvm-profdata') 175 | self.merge_fdata = Path(bin_folder, 'merge-fdata') 176 | self.perf2bolt = Path(bin_folder, 'perf2bolt') -------------------------------------------------------------------------------- /file/clang-build/tc_build/utils.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import subprocess 4 | import sys 5 | import time 6 | 7 | 8 | def create_gitignore(folder): 9 | folder.joinpath('.gitignore').write_text('*\n', encoding='utf-8') 10 | 11 | 12 | def curl(url, capture_output=True, destination=None, text=True): 13 | curl_cmd = ['curl', '-fLSs'] 14 | if destination: 15 | curl_cmd += ['-o', destination] 16 | curl_cmd.append(url) 17 | return subprocess.run(curl_cmd, capture_output=capture_output, check=True, text=text).stdout 18 | 19 | 20 | def flush_std_err_out(): 21 | sys.stderr.flush() 22 | sys.stdout.flush() 23 | 24 | 25 | def get_duration(start_seconds, end_seconds=None): 26 | if not end_seconds: 27 | end_seconds = time.time() 28 | seconds = int(end_seconds - start_seconds) 29 | days, seconds = divmod(seconds, 60 * 60 * 24) 30 | hours, seconds = divmod(seconds, 60 * 60) 31 | minutes, seconds = divmod(seconds, 60) 32 | 33 | parts = [] 34 | if days: 35 | parts.append(f"{days}d") 36 | if hours: 37 | parts.append(f"{hours}h") 38 | if minutes: 39 | parts.append(f"{minutes}m") 40 | parts.append(f"{seconds}s") 41 | 42 | return ' '.join(parts) 43 | 44 | 45 | def libc_is_musl(): 46 | # musl's ldd does not appear to support '--version' directly, as its return 47 | # code is 1 and it prints all text to stderr. However, it does print the 48 | # version information so it is good enough. Just 'check=False' it and move 49 | # on. 50 | ldd_out = subprocess.run(['ldd', '--version'], capture_output=True, check=False, text=True) 51 | return 'musl' in (ldd_out.stderr if ldd_out.stderr else ldd_out.stdout) 52 | 53 | 54 | def print_color(color, string): 55 | print(f"{color}{string}\033[0m", flush=True) 56 | 57 | 58 | def print_cyan(msg): 59 | print_color('\033[01;36m', msg) 60 | 61 | 62 | def print_header(string): 63 | border = ''.join(["=" for _ in range(len(string) + 6)]) 64 | print_cyan(f"\n{border}\n== {string} ==\n{border}\n") 65 | 66 | 67 | def print_info(msg): 68 | print(f"I: {msg}", flush=True) 69 | 70 | 71 | def print_warning(msg): 72 | print_color('\033[01;33m', f"W: {msg}") -------------------------------------------------------------------------------- /file/gh-proxy/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM guysoft/uwsgi-nginx:python3.7 2 | 3 | LABEL maintainer="hunshcn " 4 | 5 | RUN pip install flask requests 6 | 7 | COPY ./app /app 8 | WORKDIR /app 9 | 10 | # Make /app/* available to be imported by Python globally to better support several use cases like Alembic migrations. 11 | ENV PYTHONPATH=/app 12 | 13 | # Move the base entrypoint to reuse it 14 | RUN mv /entrypoint.sh /uwsgi-nginx-entrypoint.sh 15 | # Copy the entrypoint that will generate Nginx additional configs 16 | COPY entrypoint.sh /entrypoint.sh 17 | RUN chmod +x /entrypoint.sh 18 | 19 | ENTRYPOINT ["/entrypoint.sh"] 20 | 21 | # Run the start script provided by the parent image tiangolo/uwsgi-nginx. 22 | # It will check for an /app/prestart.sh script (e.g. for migrations) 23 | # And then will start Supervisor, which in turn will start Nginx and uWSGI 24 | 25 | EXPOSE 80 26 | 27 | CMD ["/start.sh"] 28 | -------------------------------------------------------------------------------- /file/gh-proxy/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 hunshcn 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /file/gh-proxy/app/uwsgi.ini: -------------------------------------------------------------------------------- 1 | [uwsgi] 2 | module = main 3 | callable = app 4 | -------------------------------------------------------------------------------- /file/gh-proxy/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | set -e 3 | 4 | /uwsgi-nginx-entrypoint.sh 5 | 6 | # Get the listen port for Nginx, default to 80 7 | USE_LISTEN_PORT=${LISTEN_PORT:-80} 8 | 9 | if [ -f /app/nginx.conf ]; then 10 | cp /app/nginx.conf /etc/nginx/nginx.conf 11 | else 12 | content_server='server {\n' 13 | content_server=$content_server" listen ${USE_LISTEN_PORT};\n" 14 | content_server=$content_server' location / {\n' 15 | content_server=$content_server' try_files $uri @app;\n' 16 | content_server=$content_server' }\n' 17 | content_server=$content_server' location @app {\n' 18 | content_server=$content_server' include uwsgi_params;\n' 19 | content_server=$content_server' uwsgi_pass unix:///tmp/uwsgi.sock;\n' 20 | content_server=$content_server' }\n' 21 | content_server=$content_server'}\n' 22 | # Save generated server /etc/nginx/conf.d/nginx.conf 23 | printf "$content_server" > /etc/nginx/conf.d/nginx.conf 24 | fi 25 | 26 | exec "$@" 27 | -------------------------------------------------------------------------------- /file/gh-proxy/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Potterli20/file/d3c78cbb620cdb0e8a039bbdbe0a4516396abe1b/file/gh-proxy/favicon.ico -------------------------------------------------------------------------------- /file/gh-proxy/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 107 | 108 | 109 | 110 | 111 | 118 | GitHub 文件加速 119 | 120 | 121 |

GitHub 文件加速

122 |
123 | 128 | 129 |

GitHub文件链接带不带协议头都可以,支持release、archive以及文件,右键复制出来的链接都是符合标准的。

130 |

release、archive使用cf加速,文件会跳转至JsDelivr

131 |

注意,不支持项目文件夹

132 | 133 |
134 | 135 | 136 | 137 | -------------------------------------------------------------------------------- /file/gh-proxy/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | /** 4 | * static files (404.html, sw.js, conf.js) 5 | */ 6 | const ASSET_URL = 'https://file-git.trli.cub/file/gh-proxy/' 7 | // 前缀,如果自定义路由为example.com/gh/*,将PREFIX改为 '/gh/',注意,少一个杠都会错! 8 | const PREFIX = '/' 9 | // 分支文件使用jsDelivr镜像的开关,0为关闭,默认关闭 10 | const Config = { 11 | jsdelivr: 0 12 | } 13 | 14 | const whiteList = [] // 白名单,路径里面有包含字符的才会通过,e.g. ['/username/'] 15 | 16 | /** @type {RequestInit} */ 17 | const PREFLIGHT_INIT = { 18 | status: 204, 19 | headers: new Headers({ 20 | 'access-control-allow-origin': '*', 21 | 'access-control-allow-methods': 'GET,POST,PUT,PATCH,TRACE,DELETE,HEAD,OPTIONS', 22 | 'access-control-max-age': '1728000', 23 | }), 24 | } 25 | 26 | 27 | const exp1 = /^(?:https?:\/\/)?github\.com\/.+?\/.+?\/(?:releases|archive)\/.*$/i 28 | const exp2 = /^(?:https?:\/\/)?github\.com\/.+?\/.+?\/(?:blob|raw)\/.*$/i 29 | const exp3 = /^(?:https?:\/\/)?github\.com\/.+?\/.+?\/(?:info|git-).*$/i 30 | const exp4 = /^(?:https?:\/\/)?raw\.(?:githubusercontent|github)\.com\/.+?\/.+?\/.+?\/.+$/i 31 | const exp5 = /^(?:https?:\/\/)?gist\.(?:githubusercontent|github)\.com\/.+?\/.+?\/.+$/i 32 | const exp6 = /^(?:https?:\/\/)?github\.com\/.+?\/.+?\/tags.*$/i 33 | 34 | /** 35 | * @param {any} body 36 | * @param {number} status 37 | * @param {Object} headers 38 | */ 39 | function makeRes(body, status = 200, headers = {}) { 40 | headers['access-control-allow-origin'] = '*' 41 | return new Response(body, {status, headers}) 42 | } 43 | 44 | 45 | /** 46 | * @param {string} urlStr 47 | */ 48 | function newUrl(urlStr) { 49 | try { 50 | return new URL(urlStr) 51 | } catch (err) { 52 | return null 53 | } 54 | } 55 | 56 | 57 | addEventListener('fetch', e => { 58 | const ret = fetchHandler(e) 59 | .catch(err => makeRes('cfworker error:\n' + err.stack, 502)) 60 | e.respondWith(ret) 61 | }) 62 | 63 | 64 | function checkUrl(u) { 65 | for (let i of [exp1, exp2, exp3, exp4, exp5, exp6]) { 66 | if (u.search(i) === 0) { 67 | return true 68 | } 69 | } 70 | return false 71 | } 72 | 73 | /** 74 | * @param {FetchEvent} e 75 | */ 76 | async function fetchHandler(e) { 77 | const req = e.request 78 | const urlStr = req.url 79 | const urlObj = new URL(urlStr) 80 | let path = urlObj.searchParams.get('q') 81 | if (path) { 82 | return Response.redirect('https://' + urlObj.host + PREFIX + path, 301) 83 | } 84 | // cfworker 会把路径中的 `//` 合并成 `/` 85 | path = urlObj.href.substr(urlObj.origin.length + PREFIX.length).replace(/^https?:\/+/, 'https://') 86 | if (path.search(exp1) === 0 || path.search(exp5) === 0 || path.search(exp6) === 0 || path.search(exp3) === 0 || path.search(exp4) === 0) { 87 | return httpHandler(req, path) 88 | } else if (path.search(exp2) === 0) { 89 | if (Config.jsdelivr) { 90 | const newUrl = path.replace('/blob/', '@').replace(/^(?:https?:\/\/)?github\.com/, 'https://cdn.jsdelivr.net/gh') 91 | return Response.redirect(newUrl, 302) 92 | } else { 93 | path = path.replace('/blob/', '/raw/') 94 | return httpHandler(req, path) 95 | } 96 | } else if (path.search(exp4) === 0) { 97 | const newUrl = path.replace(/(?<=com\/.+?\/.+?)\/(.+?\/)/, '@$1').replace(/^(?:https?:\/\/)?raw\.(?:githubusercontent|github)\.com/, 'https://cdn.jsdelivr.net/gh') 98 | return Response.redirect(newUrl, 302) 99 | } else { 100 | return fetch(ASSET_URL + path) 101 | } 102 | } 103 | 104 | 105 | /** 106 | * @param {Request} req 107 | * @param {string} pathname 108 | */ 109 | function httpHandler(req, pathname) { 110 | const reqHdrRaw = req.headers 111 | 112 | // preflight 113 | if (req.method === 'OPTIONS' && 114 | reqHdrRaw.has('access-control-request-headers') 115 | ) { 116 | return new Response(null, PREFLIGHT_INIT) 117 | } 118 | 119 | const reqHdrNew = new Headers(reqHdrRaw) 120 | 121 | let urlStr = pathname 122 | let flag = !Boolean(whiteList.length) 123 | for (let i of whiteList) { 124 | if (urlStr.includes(i)) { 125 | flag = true 126 | break 127 | } 128 | } 129 | if (!flag) { 130 | return new Response("blocked", {status: 403}) 131 | } 132 | if (urlStr.startsWith('github')) { 133 | urlStr = 'https://' + urlStr 134 | } 135 | const urlObj = newUrl(urlStr) 136 | 137 | /** @type {RequestInit} */ 138 | const reqInit = { 139 | method: req.method, 140 | headers: reqHdrNew, 141 | redirect: 'manual', 142 | body: req.body 143 | } 144 | return proxy(urlObj, reqInit) 145 | } 146 | 147 | 148 | /** 149 | * 150 | * @param {URL} urlObj 151 | * @param {RequestInit} reqInit 152 | */ 153 | async function proxy(urlObj, reqInit) { 154 | const res = await fetch(urlObj.href, reqInit) 155 | const resHdrOld = res.headers 156 | const resHdrNew = new Headers(resHdrOld) 157 | 158 | const status = res.status 159 | 160 | if (resHdrNew.has('location')) { 161 | let _location = resHdrNew.get('location') 162 | if (checkUrl(_location)) 163 | resHdrNew.set('location', PREFIX + _location) 164 | else { 165 | reqInit.redirect = 'follow' 166 | return proxy(newUrl(_location), reqInit) 167 | } 168 | } 169 | resHdrNew.set('access-control-expose-headers', '*') 170 | resHdrNew.set('access-control-allow-origin', '*') 171 | 172 | resHdrNew.delete('content-security-policy') 173 | resHdrNew.delete('content-security-policy-report-only') 174 | resHdrNew.delete('clear-site-data') 175 | 176 | return new Response(res.body, { 177 | status, 178 | headers: resHdrNew, 179 | }) 180 | } 181 | 182 | -------------------------------------------------------------------------------- /file/ios-dns/other/doh-pure.onedns.net.mobileconfig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PayloadContent 6 | 7 | 8 | DNSSettings 9 | 10 | DNSProtocol 11 | HTTPS 12 | ServerURL 13 | https://doh-pure.onedns.net/dns-query 14 | 15 | PayloadDescription 16 | Configures device to use AdGuard Home 17 | PayloadDisplayName 18 | doh-pure.onedns.net DoH 19 | PayloadIdentifier 20 | com.apple.dnsSettings.managed.c5c30cef-31bd-4fe8-807f-07ddeacee1ae 21 | PayloadType 22 | com.apple.dnsSettings.managed 23 | PayloadUUID 24 | 39647b29-8206-4b12-8e00-f913eade89cf 25 | PayloadVersion 26 | 1 27 | 28 | 29 | PayloadDescription 30 | Adds AdGuard Home to macOS Big Sur and iOS 14 or newer systems 31 | PayloadDisplayName 32 | doh-pure.onedns.net DoH 33 | PayloadIdentifier 34 | bf306cbf-33b2-4ead-a543-e86d4069c3f6 35 | PayloadRemovalDisallowed 36 | 37 | PayloadType 38 | Configuration 39 | PayloadUUID 40 | 03a72845-d127-4268-9e63-3c1aaf700c86 41 | PayloadVersion 42 | 1 43 | 44 | -------------------------------------------------------------------------------- /file/ios-dns/other/doh.pub-doh.mobileconfig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PayloadContent 6 | 7 | 8 | DNSSettings 9 | 10 | DNSProtocol 11 | HTTPS 12 | ServerURL 13 | https://doh.pub/dns-query 14 | 15 | PayloadDescription 16 | Configures device to use AdGuard Home 17 | PayloadDisplayName 18 | doh.pub DoH 19 | PayloadIdentifier 20 | com.apple.dnsSettings.managed.593b160f-5a1a-4857-bb2f-1b15efff6211 21 | PayloadType 22 | com.apple.dnsSettings.managed 23 | PayloadUUID 24 | 87eb2073-c43d-4080-b5be-61103f0ac5b8 25 | PayloadVersion 26 | 1 27 | 28 | 29 | PayloadDescription 30 | Adds AdGuard Home to macOS Big Sur and iOS 14 or newer systems 31 | PayloadDisplayName 32 | doh.pub DoH 33 | PayloadIdentifier 34 | 0ce06176-f733-4a13-9777-95f955103ac6 35 | PayloadRemovalDisallowed 36 | 37 | PayloadType 38 | Configuration 39 | PayloadUUID 40 | fe998bd2-6379-4453-b683-3f06a0fa13ab 41 | PayloadVersion 42 | 1 43 | 44 | -------------------------------------------------------------------------------- /file/ios-dns/other/dot-pure.onedns.net.mobileconfig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PayloadContent 6 | 7 | 8 | DNSSettings 9 | 10 | DNSProtocol 11 | TLS 12 | ServerName 13 | dot-pure.onedns.net 14 | 15 | PayloadDescription 16 | Configures device to use AdGuard Home 17 | PayloadDisplayName 18 | dot-pure.onedns.net DoT 19 | PayloadIdentifier 20 | com.apple.dnsSettings.managed.bd489c64-4bc9-4cd2-a143-0681ae96f422 21 | PayloadType 22 | com.apple.dnsSettings.managed 23 | PayloadUUID 24 | d07e617e-275b-4031-87d1-54ea19e6cdfb 25 | PayloadVersion 26 | 1 27 | 28 | 29 | PayloadDescription 30 | Adds AdGuard Home to macOS Big Sur and iOS 14 or newer systems 31 | PayloadDisplayName 32 | dot-pure.onedns.net DoT 33 | PayloadIdentifier 34 | 6442494e-0eda-4d60-9219-ce6030ed7482 35 | PayloadRemovalDisallowed 36 | 37 | PayloadType 38 | Configuration 39 | PayloadUUID 40 | d88521ac-d809-48d6-b37b-4535bec7c27d 41 | PayloadVersion 42 | 1 43 | 44 | -------------------------------------------------------------------------------- /file/ios-dns/other/dot.360.cn-dot.mobileconfig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PayloadContent 6 | 7 | 8 | DNSSettings 9 | 10 | DNSProtocol 11 | TLS 12 | ServerName 13 | dot.360.cn 14 | 15 | PayloadDescription 16 | Configures device to use AdGuard Home 17 | PayloadDisplayName 18 | dot.360.cn DoT 19 | PayloadIdentifier 20 | com.apple.dnsSettings.managed.9945370b-ecb2-4fb3-86ea-29542e623222 21 | PayloadType 22 | com.apple.dnsSettings.managed 23 | PayloadUUID 24 | f857b256-e84f-4ed0-8cbf-78a52cb630f6 25 | PayloadVersion 26 | 1 27 | 28 | 29 | PayloadDescription 30 | Adds AdGuard Home to macOS Big Sur and iOS 14 or newer systems 31 | PayloadDisplayName 32 | dot.360.cn DoT 33 | PayloadIdentifier 34 | 72d16a13-8c1d-4a23-9c9b-1701b8ba1548 35 | PayloadRemovalDisallowed 36 | 37 | PayloadType 38 | Configuration 39 | PayloadUUID 40 | cfca3307-1d70-412c-ad31-89a57c7b4a1d 41 | PayloadVersion 42 | 1 43 | 44 | -------------------------------------------------------------------------------- /file/ios-dns/other/dot.pub-dot.mobileconfig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PayloadContent 6 | 7 | 8 | DNSSettings 9 | 10 | DNSProtocol 11 | TLS 12 | ServerName 13 | dot.pub 14 | 15 | PayloadDescription 16 | Configures device to use AdGuard Home 17 | PayloadDisplayName 18 | dot.pub DoT 19 | PayloadIdentifier 20 | com.apple.dnsSettings.managed.e252c694-920c-4cdf-a0ea-664fac4a4bdc 21 | PayloadType 22 | com.apple.dnsSettings.managed 23 | PayloadUUID 24 | 7bdf2797-8318-4c16-bd32-03140c701a55 25 | PayloadVersion 26 | 1 27 | 28 | 29 | PayloadDescription 30 | Adds AdGuard Home to macOS Big Sur and iOS 14 or newer systems 31 | PayloadDisplayName 32 | dot.pub DoT 33 | PayloadIdentifier 34 | bbfa7846-5e2e-454e-ba01-06802d03fbfa 35 | PayloadRemovalDisallowed 36 | 37 | PayloadType 38 | Configuration 39 | PayloadUUID 40 | e97fc990-2a82-49bb-af7a-0b7c509f0c02 41 | PayloadVersion 42 | 1 43 | 44 | -------------------------------------------------------------------------------- /file/ios-dns/other/sm2.doh.pub-doh.mobileconfig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PayloadContent 6 | 7 | 8 | DNSSettings 9 | 10 | DNSProtocol 11 | HTTPS 12 | ServerURL 13 | https://sm2.doh.pub/dns-query 14 | 15 | PayloadDescription 16 | Configures device to use AdGuard Home 17 | PayloadDisplayName 18 | sm2.doh.pub DoH 19 | PayloadIdentifier 20 | com.apple.dnsSettings.managed.27a62c94-a332-4b6e-a2a3-727ae22d2dfc 21 | PayloadType 22 | com.apple.dnsSettings.managed 23 | PayloadUUID 24 | d7d9106f-e2e3-4f64-9446-96f3f42cdf25 25 | PayloadVersion 26 | 1 27 | 28 | 29 | PayloadDescription 30 | Adds AdGuard Home to macOS Big Sur and iOS 14 or newer systems 31 | PayloadDisplayName 32 | sm2.doh.pub DoH 33 | PayloadIdentifier 34 | 460f46a5-2707-4df8-8602-234cf2d0e9e0 35 | PayloadRemovalDisallowed 36 | 37 | PayloadType 38 | Configuration 39 | PayloadUUID 40 | 79fb109b-1366-4f8d-b08d-37cd2e7c61de 41 | PayloadVersion 42 | 1 43 | 44 | -------------------------------------------------------------------------------- /file/ios-dns/trli/cdn-doh/ad-dns-lite1-cdn-doh.mobileconfig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PayloadContent 6 | 7 | 8 | DNSSettings 9 | 10 | DNSProtocol 11 | HTTPS 12 | ServerURL 13 | https://dns-cdn.trli.club/doh/ad-dns-lite 14 | 15 | PayloadDescription 16 | Configures device to use trli-doh-cdn-ad-dns-lite1 17 | PayloadDisplayName 18 | dns-cdn.trli.club DoH 19 | PayloadIdentifier 20 | com.apple.dnsSettings.managed.980fe906-3b1a-4d47-aaaa-4e59f4f8b02f 21 | PayloadType 22 | com.apple.dnsSettings.managed 23 | PayloadUUID 24 | a1abf56f-5203-43cf-96cd-ef83b0ffa308 25 | PayloadVersion 26 | 1 27 | 28 | 29 | PayloadDescription 30 | Adds trli-doh-cdn-ad-dns-lite1 to macOS Big Sur and iOS 14 or newer systems. If you have any questions, please contact me in the https://hosts.trli.club group. 31 | PayloadDisplayName 32 | dns-cdn.trli.club/doh/ad-dns-lite DoH服务 33 | PayloadIdentifier 34 | 70356afe-79ec-46bf-9c53-9326c694ad46 35 | PayloadRemovalDisallowed 36 | 37 | PayloadType 38 | Configuration 39 | PayloadUUID 40 | e798bc4d-459a-45c4-b273-2af9a4ced199 41 | PayloadVersion 42 | 1 43 | 44 | -------------------------------------------------------------------------------- /file/ios-dns/trli/cdn-doh/ad-dns-lite2-cdn-doh.mobileconfig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PayloadContent 6 | 7 | 8 | DNSSettings 9 | 10 | DNSProtocol 11 | HTTPS 12 | ServerURL 13 | https://dns-cdn.trli.club/doh1/ad-dns-lite 14 | 15 | PayloadDescription 16 | Configures device to use trli-doh-cdn-ad-dns-lite2 17 | PayloadDisplayName 18 | dns-cdn.trli.club DoH 19 | PayloadIdentifier 20 | com.apple.dnsSettings.managed.859485f3-cc47-4ee4-91f5-a71b33948132 21 | PayloadType 22 | com.apple.dnsSettings.managed 23 | PayloadUUID 24 | 89c58aff-1ae6-495c-a3d7-54e618062201 25 | PayloadVersion 26 | 1 27 | 28 | 29 | PayloadDescription 30 | Adds trli-doh-cdn-ad-dns-lite2 to macOS Big Sur and iOS 14 or newer systems. If you have any questions, please contact me in the https://hosts.trli.club group. 31 | PayloadDisplayName 32 | dns-cdn.trli.club/doh1/ad-dns-lite DoH服务 33 | PayloadIdentifier 34 | 68c1214b-e43d-4ef2-8e8a-b7b3a5f8131b 35 | PayloadRemovalDisallowed 36 | 37 | PayloadType 38 | Configuration 39 | PayloadUUID 40 | 51821bcb-2191-4e5b-8fae-2bf66821776c 41 | PayloadVersion 42 | 1 43 | 44 | -------------------------------------------------------------------------------- /file/ios-dns/trli/cdn-doh/ad-dns-pro1-cdn-doh.mobileconfig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PayloadContent 6 | 7 | 8 | DNSSettings 9 | 10 | DNSProtocol 11 | HTTPS 12 | ServerURL 13 | https://dns-cdn.trli.club/doh/ad-dns-pro 14 | 15 | PayloadDescription 16 | Configures device to use trli-doh-cdn-ad-dns-pro1 17 | PayloadDisplayName 18 | dns-cdn.trli.club DoH 19 | PayloadIdentifier 20 | com.apple.dnsSettings.managed.989159a2-7bbc-424d-9b53-4bf6dea486f5 21 | PayloadType 22 | com.apple.dnsSettings.managed 23 | PayloadUUID 24 | 4d8a9cd4-509f-4732-9f50-36f4b0367974 25 | PayloadVersion 26 | 1 27 | 28 | 29 | PayloadDescription 30 | Adds trli-doh-cdn-ad-dns-pro1 to macOS Big Sur and iOS 14 or newer systems. If you have any questions, please contact me in the https://hosts.trli.club group. 31 | PayloadDisplayName 32 | dns-cdn.trli.club/doh/ad-dns-pro DoH服务 33 | PayloadIdentifier 34 | d58f41fb-6ab2-4a92-b03d-7ba0512a7040 35 | PayloadRemovalDisallowed 36 | 37 | PayloadType 38 | Configuration 39 | PayloadUUID 40 | a035dbda-c9e2-4930-b3d6-69add8f4bfe8 41 | PayloadVersion 42 | 1 43 | 44 | -------------------------------------------------------------------------------- /file/ios-dns/trli/cdn-doh/ad-dns-pro2-cdn-doh.mobileconfig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PayloadContent 6 | 7 | 8 | DNSSettings 9 | 10 | DNSProtocol 11 | HTTPS 12 | ServerURL 13 | https://dns-cdn.trli.club/doh1/ad-dns-pro 14 | 15 | PayloadDescription 16 | Configures device to use trli-doh-cdn-ad-dns-pro2 17 | PayloadDisplayName 18 | dns-cdn.trli.club DoH 19 | PayloadIdentifier 20 | com.apple.dnsSettings.managed.ad3df2c1-c3f6-48c7-8b80-76af915ec068 21 | PayloadType 22 | com.apple.dnsSettings.managed 23 | PayloadUUID 24 | 13267085-0eaa-471c-89d3-d6c44cf41e0c 25 | PayloadVersion 26 | 1 27 | 28 | 29 | PayloadDescription 30 | Adds trli-doh-cdn-ad-dns-pro2 to macOS Big Sur and iOS 14 or newer systems. If you have any questions, please contact me in the https://hosts.trli.club group. 31 | PayloadDisplayName 32 | dns-cdn.trli.club/doh1/ad-dns-pro DoH服务 33 | PayloadIdentifier 34 | 1203d73e-47e5-4364-8b9b-67790734c936 35 | PayloadRemovalDisallowed 36 | 37 | PayloadType 38 | Configuration 39 | PayloadUUID 40 | 29b466b4-b85f-48fe-b92c-b179fa7ca4c7 41 | PayloadVersion 42 | 1 43 | 44 | -------------------------------------------------------------------------------- /file/ios-dns/trli/cdn-doh/dns-apple1-cdn-doh.mobileconfig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PayloadContent 6 | 7 | 8 | DNSSettings 9 | 10 | DNSProtocol 11 | HTTPS 12 | ServerURL 13 | https://dns-cdn.trli.club/doh/dns-apple 14 | 15 | PayloadDescription 16 | Configures device to use trli-doh-cdn-dns-apple 17 | PayloadDisplayName 18 | dns-cdn.trli.club DoH 19 | PayloadIdentifier 20 | com.apple.dnsSettings.managed.310e51b3-a177-4599-94bb-948b433f0a25 21 | PayloadType 22 | com.apple.dnsSettings.managed 23 | PayloadUUID 24 | 799b7c71-f443-4edb-ab5a-f26d589e035f 25 | PayloadVersion 26 | 1 27 | 28 | 29 | PayloadDescription 30 | Adds trli-doh-cdn-dns-apple to macOS Big Sur and iOS 14 or newer systems. If you have any questions, please contact me in the https://hosts.trli.club group. PayloadDisplayName 31 | dns-cdn.trli.club/doh/dns-apple DoH服务 32 | PayloadIdentifier 33 | f677c745-d4c8-4a7f-85da-d58a66754dfa 34 | PayloadRemovalDisallowed 35 | 36 | PayloadType 37 | Configuration 38 | PayloadUUID 39 | 081a8862-5682-416b-af1d-feedcb96f785 40 | PayloadVersion 41 | 1 42 | 43 | -------------------------------------------------------------------------------- /file/ios-dns/trli/cdn-doh/dns-apple2-cdn-doh.mobileconfig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PayloadContent 6 | 7 | 8 | DNSSettings 9 | 10 | DNSProtocol 11 | HTTPS 12 | ServerURL 13 | https://dns-cdn.trli.club/doh1/dns-apple 14 | 15 | PayloadDescription 16 | Configures device to use trli-doh-cdn-dns2-apple 17 | PayloadDisplayName 18 | dns-cdn.trli.club DoH 19 | PayloadIdentifier 20 | com.apple.dnsSettings.managed.17dc105c-2ee7-4c9a-ac61-a2a788c5eb5e 21 | PayloadType 22 | com.apple.dnsSettings.managed 23 | PayloadUUID 24 | 741e0a66-daf4-46e4-8dcd-29860376e615 25 | PayloadVersion 26 | 1 27 | 28 | 29 | PayloadDescription 30 | Adds trli-doh-cdn-dns2-apple to macOS Big Sur and iOS 14 or newer systems. If you have any questions, please contact me in the https://hosts.trli.club group. PayloadDisplayName 31 | PayloadDisplayName 32 | dns-cdn.trli.club/doh1/dns-apple DoH服务 33 | PayloadIdentifier 34 | e6fbe153-0bd9-4b56-af34-3483be7c2bff 35 | PayloadRemovalDisallowed 36 | 37 | PayloadType 38 | Configuration 39 | PayloadUUID 40 | 07426a5d-6b2e-4e52-9260-f8aba6809506 41 | PayloadVersion 42 | 1 43 | 44 | -------------------------------------------------------------------------------- /file/ios-dns/trli/cdn-doh/dns-hosts1-cdn-doh.mobileconfig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PayloadContent 6 | 7 | 8 | DNSSettings 9 | 10 | DNSProtocol 11 | HTTPS 12 | ServerURL 13 | https://dns-cdn.trli.club/doh/dns-hosts 14 | 15 | PayloadDescription 16 | Configures device to use trli-doh-cdn-dns-hosts1 17 | PayloadDisplayName 18 | dns-cdn.trli.club DoH 19 | PayloadIdentifier 20 | com.apple.dnsSettings.managed.068c2708-787d-49c4-87fa-b3c5ff3c9320 21 | PayloadType 22 | com.apple.dnsSettings.managed 23 | PayloadUUID 24 | 8e543f37-0bfc-4374-a93e-7f388d8b11a7 25 | PayloadVersion 26 | 1 27 | 28 | 29 | PayloadDescription 30 | Adds trli-doh-cdn-dns-hosts1 to macOS Big Sur and iOS 14 or newer systems. If you have any questions, please contact me in the https://hosts.trli.club group. 31 | PayloadDisplayName 32 | dns-cdn.trli.club/doh/dns-hosts DoH服务 33 | PayloadIdentifier 34 | 36038c8f-2659-4d35-a9a0-07e7bd70d2a5 35 | PayloadRemovalDisallowed 36 | 37 | PayloadType 38 | Configuration 39 | PayloadUUID 40 | 4ac534cc-e5f6-4dbc-b58f-17e3eae24130 41 | PayloadVersion 42 | 1 43 | 44 | -------------------------------------------------------------------------------- /file/ios-dns/trli/cdn-doh/dns-hosts2-cdn-doh.mobileconfig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PayloadContent 6 | 7 | 8 | DNSSettings 9 | 10 | DNSProtocol 11 | HTTPS 12 | ServerURL 13 | https://dns-cdn.trli.club/doh1/dns-hosts 14 | 15 | PayloadDescription 16 | Configures device to use trli-doh-cdn-dns-hosts2 17 | PayloadDisplayName 18 | dns-cdn.trli.club DoH 19 | PayloadIdentifier 20 | com.apple.dnsSettings.managed.26a4eaed-0e08-4b75-97d5-203a02ec5d0c 21 | PayloadType 22 | com.apple.dnsSettings.managed 23 | PayloadUUID 24 | b973a782-f1c2-4427-ab7e-b35164696839 25 | PayloadVersion 26 | 1 27 | 28 | 29 | PayloadDescription 30 | Adds trli-doh-cdn-dns-hosts2 to macOS Big Sur and iOS 14 or newer systems. If you have any questions, please contact me in the https://hosts.trli.club group. 31 | PayloadDisplayName 32 | dns-cdn.trli.club/doh1/dns-hosts DoH服务 33 | PayloadIdentifier 34 | 8821d547-2ca3-4fcf-8086-084d33e7e666 35 | PayloadRemovalDisallowed 36 | 37 | PayloadType 38 | Configuration 39 | PayloadUUID 40 | 39fe7b8d-85cb-4b67-bbf7-4de3722b7b49 41 | PayloadVersion 42 | 1 43 | 44 | -------------------------------------------------------------------------------- /file/ios-dns/trli/cdn-doh/dns1-cdn-doh.mobileconfig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PayloadContent 6 | 7 | 8 | DNSSettings 9 | 10 | DNSProtocol 11 | HTTPS 12 | ServerURL 13 | https://dns-cdn.trli.club/doh/dns 14 | 15 | PayloadDescription 16 | Configures device to use trli-doh-cdn-dns1 17 | PayloadDisplayName 18 | dns-cdn.trli.club DoH 19 | PayloadIdentifier 20 | com.apple.dnsSettings.managed.076e7f82-ab2d-4514-bb34-1d1b68155225 21 | PayloadType 22 | com.apple.dnsSettings.managed 23 | PayloadUUID 24 | c7394ce8-9dea-4141-9226-a17f2b36fad3 25 | PayloadVersion 26 | 1 27 | 28 | 29 | PayloadDescription 30 | Adds trli-doh-cdn-dns1 to macOS Big Sur and iOS 14 or newer systems. If you have any questions, please contact me in the https://hosts.trli.club group. 31 | PayloadDisplayName 32 | dns-cdn.trli.club/doh/dns DoH服务 33 | PayloadIdentifier 34 | d9aaa576-67ac-402f-9178-dbf42d9b040c 35 | PayloadRemovalDisallowed 36 | 37 | PayloadType 38 | Configuration 39 | PayloadUUID 40 | 45fa1b2f-2996-499f-a76a-6028a8f3436b 41 | PayloadVersion 42 | 1 43 | 44 | -------------------------------------------------------------------------------- /file/ios-dns/trli/cdn-doh/dns2-cdn-doh.mobileconfig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PayloadContent 6 | 7 | 8 | DNSSettings 9 | 10 | DNSProtocol 11 | HTTPS 12 | ServerURL 13 | https://dns-cdn.trli.club/doh1/dns 14 | 15 | PayloadDescription 16 | Configures device to use trli-doh-cdn-dns2 17 | PayloadDisplayName 18 | dns-cdn.trli.club DoH 19 | PayloadIdentifier 20 | com.apple.dnsSettings.managed.2b756cff-d1bf-4525-82c8-881f63a4476e 21 | PayloadType 22 | com.apple.dnsSettings.managed 23 | PayloadUUID 24 | a108a7cc-5d62-400d-adab-43d968bde4f4 25 | PayloadVersion 26 | 1 27 | 28 | 29 | PayloadDescription 30 | Adds trli-doh-cdn-dns2 to macOS Big Sur and iOS 14 or newer systems. If you have any questions, please contact me in the https://hosts.trli.club group. 31 | PayloadDisplayName 32 | dns-cdn.trli.club/doh1/dns DoH服务 33 | PayloadIdentifier 34 | 967f8d24-11be-4602-97b6-5035630c0ada 35 | PayloadRemovalDisallowed 36 | 37 | PayloadType 38 | Configuration 39 | PayloadUUID 40 | 89a6c46b-9038-4ee8-8a6d-f4228b7bdc36 41 | PayloadVersion 42 | 1 43 | 44 | -------------------------------------------------------------------------------- /file/js/pure.mini.js: -------------------------------------------------------------------------------- 1 | var bszCaller,bszTag;!function(){var c,d,e,a=!1,b=[];ready=function(c){return a||"interactive"===document.readyState||"complete"===document.readyState?c.call(document):b.push(function(){return c.call(this)}),this},d=function(){for(var a=0,c=b.length;c>a;a++)b[a].apply(document);b=[]},e=function(){a||(a=!0,d.call(window),document.removeEventListener?document.removeEventListener("DOMContentLoaded",e,!1):document.attachEvent&&(document.detachEvent("onreadystatechange",e),window==window.top&&(clearInterval(c),c=null)))},document.addEventListener?document.addEventListener("DOMContentLoaded",e,!1):document.attachEvent&&(document.attachEvent("onreadystatechange",function(){/loaded|complete/.test(document.readyState)&&e()}),window==window.top&&(c=setInterval(function(){try{a||document.documentElement.doScroll("left")}catch(b){return}e()},5)))}(),bszCaller={fetch:function(a,b){var c="BusuanziCallback_"+Math.floor(1099511627776*Math.random());window[c]=this.evalCall(b),a=a.replace("=BusuanziCallback","="+c),scriptTag=document.createElement("SCRIPT"),scriptTag.type="text/javascript",scriptTag.defer=!0,scriptTag.src=a,scriptTag.referrerPolicy="no-referrer-when-downgrade",document.getElementsByTagName("HEAD")[0].appendChild(scriptTag)},evalCall:function(a){return function(b){ready(function(){try{a(b),scriptTag.parentElement.removeChild(scriptTag)}catch(c){bszTag.hides()}})}}},bszCaller.fetch("https://counter.busuanzi.icodeq.com/?jsonpCallback=BusuanziCallback",function(a){bszTag.texts(a),bszTag.shows()}),bszTag={bszs:["site_pv","page_pv","site_uv"],texts:function(a){this.bszs.map(function(b){var c=document.getElementById("busuanzi_value_"+b);c&&(c.innerHTML=a[b])})},hides:function(){this.bszs.map(function(a){var b=document.getElementById("busuanzi_container_"+a);b&&(b.style.display="none")})},shows:function(){this.bszs.map(function(a){var b=document.getElementById("busuanzi_container_"+a);b&&(b.style.display="inline")})}}; 2 | -------------------------------------------------------------------------------- /file/openwrt/README.md: -------------------------------------------------------------------------------- 1 | src-git NueXini_Packages https://git-fast.trli.club/https://github.com/NueXini/NueXini_Packages.git
2 | src-git openclash https://git-fast.trli.club/https://github.com/vernesong/OpenClash.git;dev
3 | src-git-full opentopd https://git-fast.trli.club/https://github.com/sirpdboy/sirpdboy-package
4 | src-git store https://git-fast.trli.club/https://github.com/linkease/istore.git;main
5 | src-git kenzo https://git-fast.trli.club/https://github.com/kenzok8/openwrt-packages
6 | src-git small https://git-fast.trli.club/https://github.com/kenzok8/small
7 | src-git small8 https://git-fast.trli.club/https://github.com/kenzok8/small-package
8 | -------------------------------------------------------------------------------- /file/other/README.md: -------------------------------------------------------------------------------- 1 | # 天翼网盘amy(电信) 2 | 名称:any
3 | apn:ctwap
4 | -------------------------------------------------------------------------------- /file/other/百度amy.txt: -------------------------------------------------------------------------------- 1 | { 2 | "Socks5ListenAddr": ":10800", 3 | "PidFile": "amy4.pid", 4 | "DnsListenAddr": ":10530", 5 | "//": "以上内容不能修改", 6 | "AmyOuts": [{ 7 | "Tag": "baidu", 8 | "//": "百度", 9 | "ProxyType": "baidu", 10 | "BaiduSettings": { 11 | "Secret": "kyy_free", 12 | "DestAddrs": ["cloudnproxy.baidu.com:443"], 13 | "//": "Amy4Server地址, 如果不填则不能代理UDP和部分TCP", 14 | "//": "TCP连接池, 不设置则不开启", 15 | "TCPPool": { 16 | "//": "最大空闲连接数", 17 | "MaxConn": 60, 18 | "//": "最小空闲连接数(达到最小空闲连接数时自动扩张到最大空闲连接数)", 19 | "MinConn": 5, 20 | "//": "生成连接速度(每秒生成N个连接)", 21 | "DialSpeed": 15, 22 | "//": "连接最大空闲时间, 超过该时间连接则将失效(如果不设置则永不失效)", 23 | "IdleSec": 295 24 | } 25 | } 26 | }], 27 | "Routers": [] 28 | } -------------------------------------------------------------------------------- /file/picture/0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Potterli20/file/d3c78cbb620cdb0e8a039bbdbe0a4516396abe1b/file/picture/0.jpg -------------------------------------------------------------------------------- /file/picture/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Potterli20/file/d3c78cbb620cdb0e8a039bbdbe0a4516396abe1b/file/picture/1.png -------------------------------------------------------------------------------- /file/picture/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Potterli20/file/d3c78cbb620cdb0e8a039bbdbe0a4516396abe1b/file/picture/3.jpg -------------------------------------------------------------------------------- /file/picture/ali-hb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Potterli20/file/d3c78cbb620cdb0e8a039bbdbe0a4516396abe1b/file/picture/ali-hb.jpg -------------------------------------------------------------------------------- /file/picture/alipay.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Potterli20/file/d3c78cbb620cdb0e8a039bbdbe0a4516396abe1b/file/picture/alipay.jpg -------------------------------------------------------------------------------- /file/serv00-login/login.py: -------------------------------------------------------------------------------- 1 | import json 2 | import asyncio 3 | from pyppeteer import launch 4 | from datetime import datetime, timedelta 5 | import aiofiles 6 | import random 7 | import requests 8 | import os 9 | 10 | # 从环境变量中获取 Telegram Bot Token 和 Chat ID 11 | TELEGRAM_BOT_TOKEN = os.getenv('TELEGRAM_BOT_TOKEN') 12 | TELEGRAM_CHAT_ID = os.getenv('TELEGRAM_CHAT_ID') 13 | 14 | def format_to_iso(date): 15 | return date.strftime('%Y-%m-%d %H:%M:%S') 16 | 17 | async def delay_time(ms): 18 | await asyncio.sleep(ms / 1000) 19 | 20 | # 全局浏览器实例 21 | browser = None 22 | 23 | async def login(username, password, panelnum): 24 | global browser 25 | 26 | page = None # 确保 page 在任何情况下都被定义 27 | 28 | try: 29 | if not browser: 30 | browser = await launch(headless=True, args=['--no-sandbox', '--disable-setuid-sandbox']) 31 | 32 | page = await browser.newPage() 33 | url = f'https://panel{panelnum}.serv00.com/login/?next=/' 34 | await page.goto(url) 35 | 36 | username_input = await page.querySelector('#id_username') 37 | if username_input: 38 | await page.evaluate('''(input) => input.value = ""''', username_input) 39 | 40 | await page.type('#id_username', username) 41 | await page.type('#id_password', password) 42 | 43 | login_button = await page.querySelector('#submit') 44 | if login_button: 45 | await login_button.click() 46 | else: 47 | raise Exception('无法找到登录按钮') 48 | 49 | await page.waitForNavigation() 50 | 51 | is_logged_in = await page.evaluate('''() => { 52 | const logoutButton = document.querySelector('a[href="/logout/"]'); 53 | return logoutButton !== null; 54 | }''') 55 | 56 | return is_logged_in 57 | 58 | except Exception as e: 59 | print(f'serv00账号 {username} 登录时出现错误: {e}') 60 | return False 61 | 62 | finally: 63 | if page: 64 | await page.close() 65 | 66 | async def main(): 67 | async with aiofiles.open('accounts.json', mode='r', encoding='utf-8') as f: 68 | accounts_json = await f.read() 69 | accounts = json.loads(accounts_json) 70 | 71 | for account in accounts: 72 | username = account['username'] 73 | password = account['password'] 74 | panelnum = account['panelnum'] 75 | 76 | is_logged_in = await login(username, password, panelnum) 77 | 78 | if is_logged_in: 79 | now_utc = format_to_iso(datetime.utcnow()) 80 | now_beijing = format_to_iso(datetime.utcnow() + timedelta(hours=8)) 81 | success_message = f'serv00账号 {username} 于北京时间 {now_beijing}(UTC时间 {now_utc})登录成功!' 82 | print(success_message) 83 | send_telegram_message(success_message) 84 | else: 85 | print(f'serv00账号 {username} 登录失败,请检查serv00账号和密码是否正确。') 86 | 87 | delay = random.randint(1000, 8000) 88 | await delay_time(delay) 89 | 90 | print('所有serv00账号登录完成!') 91 | 92 | # 发送Telegram消息 93 | def send_telegram_message(message): 94 | url = f"https://api.telegram.org/bot{TELEGRAM_BOT_TOKEN}/sendMessage" 95 | payload = { 96 | 'chat_id': TELEGRAM_CHAT_ID, 97 | 'text': message, 98 | 'reply_markup': { 99 | 'inline_keyboard': [ 100 | [ 101 | { 102 | 'text': '问题反馈❓' 103 | } 104 | ] 105 | ] 106 | } 107 | } 108 | headers = { 109 | 'Content-Type': 'application/json' 110 | } 111 | response = requests.post(url, json=payload, headers=headers) 112 | if response.status_code != 200: 113 | print(f"发送消息到Telegram失败: {response.text}") 114 | 115 | # 运行主程序 116 | asyncio.get_event_loop().run_until_complete(main()) 117 | -------------------------------------------------------------------------------- /file/ssl-rtt/ssl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "请输入需要检测的域名 (比如. www.baidu.com):" 4 | read host 5 | echo "请输入域名的端口 (比如. 80,443):" 6 | read ports 7 | 8 | echo -e "HEAD / HTTP/1.1\r\nHost: $host\r\nConnection: close\r\n\r\n" > request.txt 9 | 10 | openssl s_client -connect $host:$ports -tls1_3 -sess_out session.pem -ign_eof < request.txt 11 | 12 | result=$(openssl s_client -connect $host:$ports -tls1_3 -sess_in session.pem -early_data request.txt 2>&1) 13 | 14 | if echo "$result" | grep -q "Early data was accepted"; then 15 | echo "此地址支持Early data(0-RTT 连接)" 16 | else 17 | echo "此地址不支持Early data(0-RTT 连接)" 18 | fi 19 | -------------------------------------------------------------------------------- /file/sysctl/debian-sysctl.conf: -------------------------------------------------------------------------------- 1 | net.core.busy_read=50 2 | net.core.busy_poll=50 3 | kernel.numa_balancing=0 4 | vm.dirty_ratio=10 5 | vm.dirty_background_ratio=3 6 | vm.swappiness=10 7 | vm.page-cluster=0 8 | net.ipv4.tcp_fack = 1 9 | net.ipv4.tcp_early_retrans = 3 10 | net.ipv4.neigh.default.unres_qlen = 10000 11 | net.ipv4.conf.all.route_localnet=1 12 | net.ipv4.ip_forward = 1 13 | net.ipv4.conf.all.forwarding = 1 14 | net.ipv4.conf.default.forwarding = 1 15 | net.ipv6.conf.all.forwarding = 1 16 | net.ipv6.conf.default.forwarding = 1 17 | net.ipv6.conf.lo.forwarding = 1 18 | net.ipv6.conf.all.disable_ipv6 = 0 19 | net.ipv6.conf.default.disable_ipv6 = 0 20 | net.ipv6.conf.lo.disable_ipv6 = 0 21 | net.ipv6.conf.all.accept_ra = 2 22 | net.ipv6.conf.default.accept_ra = 2 23 | net.core.netdev_max_backlog = 100000 24 | net.core.netdev_budget = 50000 25 | net.core.netdev_budget_usecs = 5000 26 | net.core.rmem_max = 67108864 27 | net.core.wmem_max = 67108864 28 | net.core.rmem_default = 67108864 29 | net.core.wmem_default = 67108864 30 | net.core.optmem_max = 65536 31 | net.core.somaxconn = 1000000 32 | net.ipv4.icmp_echo_ignore_all = 0 33 | net.ipv4.icmp_echo_ignore_broadcasts = 1 34 | net.ipv4.icmp_ignore_bogus_error_responses = 1 35 | net.ipv4.conf.all.accept_redirects = 0 36 | net.ipv4.conf.default.accept_redirects = 0 37 | net.ipv4.conf.all.secure_redirects = 0 38 | net.ipv4.conf.default.secure_redirects = 0 39 | net.ipv4.conf.all.send_redirects = 0 40 | net.ipv4.conf.default.send_redirects = 0 41 | net.ipv4.conf.default.rp_filter = 0 42 | net.ipv4.conf.all.rp_filter = 0 43 | net.ipv4.tcp_keepalive_time = 300 44 | net.ipv4.tcp_keepalive_intvl = 15 45 | net.ipv4.tcp_keepalive_probes = 2 46 | net.ipv4.tcp_synack_retries = 1 47 | net.ipv4.tcp_syncookies = 1 48 | net.ipv4.tcp_rfc1337 = 0 49 | net.ipv4.tcp_timestamps = 1 50 | net.ipv4.tcp_tw_reuse = 0 51 | net.ipv4.tcp_fin_timeout = 10 52 | net.ipv4.ip_local_port_range = 1024 65535 53 | net.ipv4.tcp_max_tw_buckets = 5000 54 | net.ipv4.tcp_fastopen = 3 55 | net.ipv4.udp_rmem_min = 8192 56 | net.ipv4.udp_wmem_min = 8192 57 | net.ipv4.tcp_mtu_probing = 1 58 | net.ipv4.tcp_autocorking = 0 59 | net.ipv4.tcp_slow_start_after_idle = 0 60 | net.ipv4.tcp_max_syn_backlog = 819200 61 | net.ipv4.tcp_notsent_lowat = 16384 62 | net.ipv4.tcp_no_metrics_save = 0 63 | net.ipv4.tcp_ecn = 1 64 | net.ipv4.tcp_ecn_fallback = 1 65 | net.ipv4.tcp_frto = 0 66 | net.ipv6.conf.all.accept_redirects = 0 67 | net.ipv6.conf.default.accept_redirects = 0 68 | net.ipv4.neigh.default.gc_thresh3 = 8192 69 | net.ipv4.neigh.default.gc_thresh2 = 4096 70 | net.ipv4.neigh.default.gc_thresh1 = 2048 71 | net.ipv6.neigh.default.gc_thresh3 = 8192 72 | net.ipv6.neigh.default.gc_thresh2 = 4096 73 | net.ipv6.neigh.default.gc_thresh1 = 2048 74 | net.ipv4.tcp_orphan_retries = 1 75 | net.ipv4.tcp_retries2 = 5 76 | vm.swappiness = 1 77 | vm.overcommit_memory = 1 78 | kernel.pid_max = 64000 79 | #net.netfilter.nf_conntrack_max = 262144 80 | #net.nf_conntrack_max = 262144 81 | ## Enable bbr 82 | net.core.default_qdisc = fq 83 | net.ipv4.tcp_congestion_control = bbr 84 | net.ipv4.tcp_low_latency = 1 85 | 86 | net.core.rmem_max = 67108848 87 | net.core.wmem_max = 67108848 88 | net.core.somaxconn = 65500 89 | net.ipv4.tcp_max_syn_backlog = 65500 90 | net.ipv4.tcp_rmem = 16384 16777216 536870912 91 | net.ipv4.tcp_wmem = 16384 16777216 536870912 92 | net.ipv4.tcp_adv_win_scale = -2 93 | net.ipv4.tcp_sack = 1 94 | kernel.panic = -1 95 | 96 | net.core.rmem_default = 26214400 97 | net.core.rmem_max = 26214400 98 | net.core.wmem_default = 26214400 99 | net.core.wmem_max = 26214400 100 | 101 | vm.dirty_ratio = 10 102 | vm.dirty_background_ratio = 5 103 | 104 | fs.suid_dumpable = 2 105 | 106 | fs.protected_hardlinks = 1 107 | fs.protected_symlinks = 1 108 | 109 | net.core.bpf_jit_enable = 1 110 | 111 | net.ipv4.conf.default.arp_ignore = 1 112 | net.ipv4.conf.all.arp_ignore = 1 113 | net.ipv4.igmp_max_memberships = 100 114 | net.ipv4.tcp_fin_timeout = 10 115 | net.ipv4.tcp_keepalive_time = 30 116 | net.ipv4.tcp_dsack = 1 117 | 118 | #net.netfilter.nf_conntrack_acct = 1 119 | #net.netfilter.nf_conntrack_checksum = 0 120 | #net.netfilter.nf_conntrack_tcp_timeout_established = 30 121 | #net.netfilter.nf_conntrack_udp_timeout = 10 122 | #net.netfilter.nf_conntrack_udp_timeout_stream = 10 123 | 124 | 125 | fs.file-max = 3195430 126 | -------------------------------------------------------------------------------- /file/sysctl/fedora-sysctrl.conf: -------------------------------------------------------------------------------- 1 | net.core.busy_read=50 2 | net.core.busy_poll=50 3 | kernel.numa_balancing=0 4 | vm.dirty_ratio=10 5 | vm.dirty_background_ratio=3 6 | vm.swappiness=10 7 | vm.page-cluster=0 8 | net.ipv4.tcp_fack = 1 9 | net.ipv4.tcp_early_retrans = 3 10 | net.ipv4.neigh.default.unres_qlen = 10000 11 | net.ipv4.conf.all.route_localnet=1 12 | net.ipv4.ip_forward = 1 13 | net.ipv4.conf.all.forwarding = 1 14 | net.ipv4.conf.default.forwarding = 1 15 | net.ipv6.conf.all.forwarding = 1 16 | net.ipv6.conf.default.forwarding = 1 17 | net.ipv6.conf.lo.forwarding = 1 18 | net.ipv6.conf.all.disable_ipv6 = 0 19 | net.ipv6.conf.default.disable_ipv6 = 0 20 | net.ipv6.conf.lo.disable_ipv6 = 0 21 | net.ipv6.conf.all.accept_ra = 2 22 | net.ipv6.conf.default.accept_ra = 2 23 | net.core.netdev_max_backlog = 100000 24 | net.core.netdev_budget = 50000 25 | net.core.netdev_budget_usecs = 5000 26 | net.core.rmem_max = 67108864 27 | net.core.wmem_max = 67108864 28 | net.core.rmem_default = 67108864 29 | net.core.wmem_default = 67108864 30 | net.core.optmem_max = 65536 31 | net.core.somaxconn = 1000000 32 | net.ipv4.icmp_echo_ignore_all = 0 33 | net.ipv4.icmp_echo_ignore_broadcasts = 1 34 | net.ipv4.icmp_ignore_bogus_error_responses = 1 35 | net.ipv4.conf.all.accept_redirects = 0 36 | net.ipv4.conf.default.accept_redirects = 0 37 | net.ipv4.conf.all.secure_redirects = 0 38 | net.ipv4.conf.default.secure_redirects = 0 39 | net.ipv4.conf.all.send_redirects = 0 40 | net.ipv4.conf.default.send_redirects = 0 41 | net.ipv4.conf.default.rp_filter = 0 42 | net.ipv4.conf.all.rp_filter = 0 43 | net.ipv4.tcp_keepalive_time = 300 44 | net.ipv4.tcp_keepalive_intvl = 15 45 | net.ipv4.tcp_keepalive_probes = 2 46 | net.ipv4.tcp_synack_retries = 1 47 | net.ipv4.tcp_syncookies = 1 48 | net.ipv4.tcp_rfc1337 = 0 49 | net.ipv4.tcp_timestamps = 1 50 | net.ipv4.tcp_tw_reuse = 0 51 | net.ipv4.tcp_fin_timeout = 10 52 | net.ipv4.ip_local_port_range = 1024 65535 53 | net.ipv4.tcp_max_tw_buckets = 5000 54 | net.ipv4.tcp_fastopen = 3 55 | net.ipv4.udp_rmem_min = 8192 56 | net.ipv4.udp_wmem_min = 8192 57 | net.ipv4.tcp_mtu_probing = 1 58 | net.ipv4.tcp_autocorking = 0 59 | net.ipv4.tcp_slow_start_after_idle = 0 60 | net.ipv4.tcp_max_syn_backlog = 819200 61 | net.ipv4.tcp_notsent_lowat = 16384 62 | net.ipv4.tcp_no_metrics_save = 0 63 | net.ipv4.tcp_ecn = 1 64 | net.ipv4.tcp_ecn_fallback = 1 65 | net.ipv4.tcp_frto = 0 66 | net.ipv6.conf.all.accept_redirects = 0 67 | net.ipv6.conf.default.accept_redirects = 0 68 | net.ipv4.neigh.default.gc_thresh3 = 8192 69 | net.ipv4.neigh.default.gc_thresh2 = 4096 70 | net.ipv4.neigh.default.gc_thresh1 = 2048 71 | net.ipv6.neigh.default.gc_thresh3 = 8192 72 | net.ipv6.neigh.default.gc_thresh2 = 4096 73 | net.ipv6.neigh.default.gc_thresh1 = 2048 74 | net.ipv4.tcp_orphan_retries = 1 75 | net.ipv4.tcp_retries2 = 5 76 | vm.swappiness = 1 77 | vm.overcommit_memory = 1 78 | kernel.pid_max = 64000 79 | net.netfilter.nf_conntrack_max = 262144 80 | net.nf_conntrack_max = 262144 81 | ## Enable bbr 82 | net.core.default_qdisc = fq 83 | net.ipv4.tcp_congestion_control = bbr 84 | net.ipv4.tcp_low_latency = 1 85 | 86 | net.core.rmem_max = 67108848 87 | net.core.wmem_max = 67108848 88 | net.core.somaxconn = 65500 89 | net.ipv4.tcp_max_syn_backlog = 65500 90 | net.ipv4.tcp_rmem = 16384 16777216 536870912 91 | net.ipv4.tcp_wmem = 16384 16777216 536870912 92 | net.ipv4.tcp_adv_win_scale = -2 93 | net.ipv4.tcp_sack = 1 94 | kernel.panic = -1 95 | 96 | net.core.rmem_default = 26214400 97 | net.core.rmem_max = 26214400 98 | net.core.wmem_default = 26214400 99 | net.core.wmem_max = 26214400 100 | 101 | vm.dirty_ratio = 10 102 | vm.dirty_background_ratio = 5 103 | 104 | fs.suid_dumpable = 2 105 | 106 | fs.protected_hardlinks = 1 107 | fs.protected_symlinks = 1 108 | 109 | net.core.bpf_jit_enable = 1 110 | 111 | net.ipv4.conf.default.arp_ignore = 1 112 | net.ipv4.conf.all.arp_ignore = 1 113 | net.ipv4.igmp_max_memberships = 100 114 | net.ipv4.tcp_fin_timeout = 10 115 | net.ipv4.tcp_keepalive_time = 30 116 | net.ipv4.tcp_dsack = 1 117 | 118 | net.netfilter.nf_conntrack_acct = 1 119 | net.netfilter.nf_conntrack_checksum = 0 120 | net.netfilter.nf_conntrack_tcp_timeout_established = 30 121 | net.netfilter.nf_conntrack_udp_timeout = 10 122 | net.netfilter.nf_conntrack_udp_timeout_stream = 10 123 | 124 | 125 | fs.file-max = 3195430 126 | -------------------------------------------------------------------------------- /file/sysctl/openwrt-sysctl.conf: -------------------------------------------------------------------------------- 1 | net.ipv4.tcp_fack = 1 2 | net.ipv4.tcp_early_retrans = 3 3 | net.ipv4.neigh.default.unres_qlen = 10000 4 | net.ipv4.conf.all.route_localnet=1 5 | net.ipv4.ip_forward = 1 6 | net.ipv4.conf.all.forwarding = 1 7 | net.ipv4.conf.default.forwarding = 1 8 | net.ipv6.conf.all.forwarding = 1 9 | net.ipv6.conf.default.forwarding = 1 10 | net.ipv6.conf.lo.forwarding = 1 11 | net.ipv6.conf.all.disable_ipv6 = 0 12 | net.ipv6.conf.default.disable_ipv6 = 0 13 | net.ipv6.conf.lo.disable_ipv6 = 0 14 | net.ipv6.conf.all.accept_ra = 2 15 | net.ipv6.conf.default.accept_ra = 2 16 | net.core.netdev_max_backlog = 100000 17 | net.core.netdev_budget = 50000 18 | net.core.netdev_budget_usecs = 5000 19 | fs.file-max = 51200 20 | net.core.rmem_max = 67108864 21 | net.core.wmem_max = 67108864 22 | net.core.rmem_default = 67108864 23 | net.core.wmem_default = 67108864 24 | net.core.optmem_max = 65536 25 | net.core.somaxconn = 1000000 26 | net.ipv4.icmp_echo_ignore_all = 0 27 | net.ipv4.icmp_echo_ignore_broadcasts = 1 28 | net.ipv4.icmp_ignore_bogus_error_responses = 1 29 | net.ipv4.conf.all.accept_redirects = 0 30 | net.ipv4.conf.default.accept_redirects = 0 31 | net.ipv4.conf.all.secure_redirects = 0 32 | net.ipv4.conf.default.secure_redirects = 0 33 | net.ipv4.conf.all.send_redirects = 0 34 | net.ipv4.conf.default.send_redirects = 0 35 | net.ipv4.conf.default.rp_filter = 0 36 | net.ipv4.conf.all.rp_filter = 0 37 | net.ipv4.tcp_keepalive_time = 300 38 | net.ipv4.tcp_keepalive_intvl = 15 39 | net.ipv4.tcp_keepalive_probes = 2 40 | net.ipv4.tcp_synack_retries = 1 41 | net.ipv4.tcp_syncookies = 1 42 | net.ipv4.tcp_rfc1337 = 0 43 | net.ipv4.tcp_timestamps = 1 44 | net.ipv4.tcp_tw_reuse = 0 45 | net.ipv4.tcp_fin_timeout = 15 46 | net.ipv4.ip_local_port_range = 1024 65535 47 | net.ipv4.tcp_max_tw_buckets = 5000 48 | net.ipv4.tcp_fastopen = 3 49 | net.ipv4.tcp_rmem = 4096 87380 67108864 50 | net.ipv4.tcp_wmem = 4096 65536 67108864 51 | net.ipv4.udp_rmem_min = 8192 52 | net.ipv4.udp_wmem_min = 8192 53 | net.ipv4.tcp_mtu_probing = 1 54 | net.ipv4.tcp_autocorking = 0 55 | net.ipv4.tcp_slow_start_after_idle = 0 56 | net.ipv4.tcp_max_syn_backlog = 819200 57 | net.ipv4.tcp_notsent_lowat = 16384 58 | net.ipv4.tcp_no_metrics_save = 0 59 | net.ipv4.tcp_ecn = 1 60 | net.ipv4.tcp_ecn_fallback = 1 61 | net.ipv4.tcp_frto = 0 62 | net.ipv6.conf.all.accept_redirects = 0 63 | net.ipv6.conf.default.accept_redirects = 0 64 | net.ipv4.neigh.default.gc_thresh3 = 8192 65 | net.ipv4.neigh.default.gc_thresh2 = 4096 66 | net.ipv4.neigh.default.gc_thresh1 = 2048 67 | net.ipv6.neigh.default.gc_thresh3 = 8192 68 | net.ipv6.neigh.default.gc_thresh2 = 4096 69 | net.ipv6.neigh.default.gc_thresh1 = 2048 70 | net.ipv4.tcp_orphan_retries = 1 71 | net.ipv4.tcp_retries2 = 5 72 | vm.swappiness = 1 73 | vm.overcommit_memory = 1 74 | kernel.pid_max = 64000 75 | net.netfilter.nf_conntrack_max = 262144 76 | net.nf_conntrack_max = 262144 77 | ## Enable bbr 78 | net.core.default_qdisc = fq 79 | net.ipv4.tcp_congestion_control = bbr 80 | net.ipv4.tcp_low_latency = 1 81 | 82 | net.core.rmem_max = 67108848 83 | net.core.wmem_max = 67108848 84 | net.core.somaxconn = 65500 85 | net.ipv4.tcp_max_syn_backlog = 65500 86 | net.ipv4.tcp_rmem = 16384 16777216 536870912 87 | net.ipv4.tcp_wmem = 16384 16777216 536870912 88 | net.ipv4.tcp_adv_win_scale = -2 89 | net.ipv4.tcp_sack = 1 90 | kernel.panic = -1 91 | 92 | net.core.rmem_default = 26214400 93 | net.core.rmem_max = 26214400 94 | net.core.wmem_default = 26214400 95 | net.core.wmem_max = 26214400 96 | 97 | vm.dirty_ratio = 10 98 | vm.dirty_background_ratio = 5 99 | 100 | fs.suid_dumpable = 2 101 | 102 | fs.protected_hardlinks = 1 103 | fs.protected_symlinks = 1 104 | 105 | net.core.bpf_jit_enable = 1 106 | 107 | net.ipv4.conf.default.arp_ignore = 1 108 | net.ipv4.conf.all.arp_ignore = 1 109 | net.ipv4.igmp_max_memberships = 100 110 | net.ipv4.tcp_fin_timeout = 30 111 | net.ipv4.tcp_keepalive_time = 120 112 | net.ipv4.tcp_dsack = 1 113 | 114 | 115 | net.bridge.bridge-nf-call-arptables = 0 116 | net.bridge.bridge-nf-call-ip6tables = 0 117 | net.bridge.bridge-nf-call-iptables = 0 118 | 119 | net.netfilter.nf_conntrack_acct = 1 120 | net.netfilter.nf_conntrack_checksum = 0 121 | net.netfilter.nf_conntrack_tcp_timeout_established = 7440 122 | net.netfilter.nf_conntrack_udp_timeout = 30 123 | net.netfilter.nf_conntrack_udp_timeout_stream = 60 124 | net.netfilter.nf_conntrack_helper = 1 -------------------------------------------------------------------------------- /file/web/dns-cn-cdn.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | dns服务 7 | 28 | 34 | 35 | 52 | 53 | 54 | 55 |
56 |
    57 |
    58 |
    59 | 📃 项目说明/Project description 60 | 61 | 62 |
  • 🛑Only for learning, communication, self-use, academic research use, do not commercial use!! Please comply with local laws and regulations, download must be deleted within 24 hours !!!!
  • 63 |
  • 🛑仅供学习交流和自用、学术研究使用,请勿商用!!!请遵守当地法律法规,下载后24小时内必须删除!!!!
  • 64 |
  • International/China accelerated ad filtering rules subscription.
  • 65 |
  • 国际/中国加速广告过滤规则订阅
  • 66 |
  • Cold Mo (TRLI) rules is the only one to provide a global comparison of the library.
  • 67 |
  • 冷莫规则是唯一一个提供全球比较的库。
  • 68 |
  • This rule is a popular rule on upstream Github and GitLab. It is not maintained by me. I only maintain the whitelist that uses this rule
  • 69 |
  • 这个规则是上游Github和GitLab的流行规则,它不是我的维护者,我只维护白名单使用这个规则。
  • 70 |
  • The blacklist and whitelist have been processed, that is, the blacklist has been used, and the mistakenly killed domain name has been processed
  • 71 |
  • The black and white list is global
  • 72 |
  • Let me know if it was a mistak
  • 73 |
  • 已经处理黑白名单,即使用了黑名单,在处理的时候已经把误杀的域名处理了
  • 74 |
  • 黑白名单是全球的
  • 75 |
  • 误杀就告诉我
  • 76 |
    77 |
    78 |
    79 | 80 |
    81 |
    82 | 📃 dns服务/DNS service 83 | 84 | 📃 国内cdn dns服务/China DNS service(中国/china) 85 | 86 |
    📃 干净的dns/Clean the DNS 87 | 88 | 89 | 90 | 91 | 92 |
    干净的dns-doh/Clean the DNS - doh 🚀 链接/Link
    主doh/main doh https://dns-cn-cdn.trli.club/doh/dns
    备doh/prepare doh https://dns-cn-cdn.trli.club/doh1/dns
    93 |
    94 |
    95 |
    📃 去广告ad-dns-doh/To advertising AD DNS DOH 96 | 97 | 98 | 99 | 100 | 101 |
    去广告ad-dns/To advertising AD DNS 🚀 链接/Link
    主doh/main doh https://dns-cn-cdn.trli.club/doh/ad-dns
    备doh/prepare doh https://dns-cn-cdn.trli.club/doh1/ad-dns
    102 |
    103 |
    104 |
    105 | 106 |
  • doh协议是采用了nginx反代理/The DOH protocol uses nGINx anti-proxy
  • 107 |
    108 |
    109 |
    110 | 111 |
    112 |
    113 | 📃 其他/Other 114 | 115 |
  • 文件库:file.trli.club:2083
  • 116 |
  • 说明库:github.com/Potterli20/hosts
  • 117 |
  • 您的浏览器UA为:
  • 118 |
  • ip地址 网站连通性检查
  • 119 |
  • dns地址 网站连通性检查 120 | 125 |
  • 126 |
    127 |
    128 |
    129 |
    130 |
    131 | 📃 群反馈 132 |
  • QQ频道【莫莫频道】
  • 133 |
    134 |
    135 |
136 | 137 |
浏览量/views:👀 | 访客数/visitors:👦
138 |
系统时间/dateTime
139 |
140 | 141 | 142 | -------------------------------------------------------------------------------- /file/web/test/.user.ini: -------------------------------------------------------------------------------- 1 | open_basedir=/www/wwwroot/test.trli.club/:/tmp/ -------------------------------------------------------------------------------- /file/web/test/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 冷莫 DNS 10 | 11 | 12 |
13 |
14 | 15 |
16 |
17 |

错误

18 |

冷莫DNS 似乎已经设置成功,但是您的检测方式可能存在错误。不过没关系,这并不影响您正常使用本服务。

19 |
20 |

冷莫DNS https://hosts.trli.club

21 |
22 |
23 | 24 | -------------------------------------------------------------------------------- /file/web/test/css/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | font-family: Arial, Helvetica, sans-serif; 5 | } 6 | html, body { 7 | width: 100%; 8 | height: 100%; 9 | display: flex; 10 | justify-content: center; 11 | align-items: center; 12 | } 13 | p { 14 | font-weight: 400; 15 | line-height: 2.15; 16 | font-family: miranafont,"Hiragino Sans GB",STXihei,"Microsoft YaHei",SimSun,sans-serif; 17 | } 18 | .container { 19 | display: flex; 20 | align-items: center; 21 | justify-content: space-evenly; 22 | align-content: space-around; 23 | flex-wrap: wrap; 24 | width: 600px; 25 | min-height: 400px; 26 | font-size: 0.9em; 27 | position: relative; 28 | top: -40px; 29 | } 30 | .image { 31 | width: 150px; 32 | height: 150px; 33 | padding: 30px; 34 | } 35 | .Svgimg { 36 | width: 100%; 37 | } 38 | .text { 39 | max-width: 300px; 40 | padding: 30px; 41 | } 42 | @media (max-width: 569px){ 43 | .text { 44 | text-align: center; 45 | } 46 | } 47 | .text h2 { 48 | color: #737373; 49 | font-size: 20px; 50 | margin-bottom: 10px; 51 | } 52 | .text h2:before { 53 | content: "["; 54 | margin-right: 5px; 55 | color: #ff6d6d; 56 | font-size: 25px; 57 | } 58 | .text h2:after { 59 | content: "]"; 60 | margin-left: 5px; 61 | color: #ff6d6d; 62 | font-size: 25px; 63 | } 64 | .text p { 65 | color: #565656; 66 | line-height: 30px; 67 | } 68 | .text a { 69 | color: #E67474; 70 | text-decoration: underline; 71 | } 72 | .text a:hover { 73 | color: #72C5A6; 74 | } 75 | @media ( prefers-color-scheme: dark ) { 76 | html, body { 77 | background: #171717; 78 | } 79 | .text h2, .text p { 80 | color: #d4d4d5; 81 | } 82 | .Svgimg { 83 | border: 2px solid #c1c1c1; 84 | border-radius: 50%; 85 | } 86 | } -------------------------------------------------------------------------------- /file/web/test/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Potterli20/file/d3c78cbb620cdb0e8a039bbdbe0a4516396abe1b/file/web/test/favicon.ico -------------------------------------------------------------------------------- /file/web/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 冷莫 DNS 10 | 11 | 28 | 29 | 30 |
31 |
32 | 33 |
34 |
35 |

恭喜

36 |

冷莫DNS 已经设置成功,正在守护您的网络。如果您在使用过程中遇到某些问题,请访问下面链接进行反馈。

37 | 您的浏览器UA为: 38 | dns检查 39 | 44 |
45 | 📃 群反馈QQ频道【莫莫频道】 46 |

dns ipv4 测试地址https://test4.trli.club:2083

47 |

dns ipv6 测试地址https://test6.trli.club:2083

48 |

冷莫DNS https://hosts.trli.club

49 |
系统时间/DateTime
50 |
51 |
52 | 53 | -------------------------------------------------------------------------------- /file/winbat/update.txt: -------------------------------------------------------------------------------- 1 | 0.2 2 | 测试 winbat-dns.bat 更新 3 | 0.1 4 | 测试 update.txt 5 | -------------------------------------------------------------------------------- /file/winbat/winbat-dns.txt: -------------------------------------------------------------------------------- 1 | @echo off 2 | chcp 65001 > null 3 | del /Q null 4 | 5 | :: 检查是否以管理员权限运行 6 | >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" 7 | if '%errorlevel%' NEQ '0' ( 8 | echo 请求管理员权限... 9 | goto UACPrompt 10 | ) else ( goto gotAdmin ) 11 | 12 | :UACPrompt 13 | echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs" 14 | echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs" 15 | "%temp%\getadmin.vbs" 16 | exit /B 17 | 18 | :gotAdmin 19 | if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" ) 20 | pushd "%CD%" 21 | CD /D "%~dp0" 22 | 23 | :: 设置随机颜色 24 | color 0a 25 | :: 设置版本号 26 | set version=1.0 27 | 28 | :: 显示欢迎信息 29 | echo 欢迎使用win的dns加密纯bat程序 30 | echo 此程序由冷莫制作,仅用于学习交流,请勿用于商业用途 31 | echo 此程序为bat程序,请不要使用exe程序 32 | echo 全部win系统适用 33 | echo 请不要随意修改代码 34 | echo 更新时间 2023-10-27 35 | echo 当前winbat-dns版本号:%version% 36 | 37 | :: 下载最新版本 38 | for /f "delims=" %%a in ('curl -s https://file-git.trli.club/file/winbat/update.txt ^| findstr /c:"[0-9]+\.[0-9]+"') do ( 39 | set latest_version=%%a 40 | if not "!latest_version!"=="" ( 41 | echo 获取到的最新winbat-dns版本号:!latest_version! 42 | if !version! geq !latest_version! ( 43 | echo 当前版本号已为最新,无需更新 44 | ) else ( 45 | echo 准备更新winbat-dns 46 | curl -o new_winbat-dns.bat https://file-git.trli.club/file/winbat/winbat-dns.txt 47 | if errorlevel 1 ( 48 | echo winbat-dns更新下载失败 49 | exit /b 50 | ) else ( 51 | echo winbat-dns更新下载成功 52 | move /Y new_winbat-dns.bat winbat-dns.bat 53 | if errorlevel 1 ( 54 | echo 更新winbat-dns文件失败 55 | ) else ( 56 | echo 更新winbat-dns文件成功 57 | echo 更新成功,请运行新的winbat-dns文件 58 | echo 是否更新?[Y/N] 59 | set /p choice=请输入Y或N: 60 | if "%choice%"=="Y" ( 61 | echo 正在运行新的winbat-dns文件 62 | start winbat-dns.bat 63 | ) else if "%choice%"=="N" ( 64 | echo 取消更新 65 | ) else ( 66 | echo 无效输入,请输入Y或N 67 | ) 68 | ) 69 | ) 70 | ) 71 | ) 72 | ) 73 | 74 | :: 显示操作选项 75 | echo 请选择以下操作: 76 | echo [1] 自动开启DNS加密 77 | echo [2] 手工开启DNS加密 78 | echo [3] 还原DNS 79 | 80 | choice /C 123 /N /M "请输入操作序号:" 81 | 82 | if errorlevel 3 goto RestoreDNS 83 | if errorlevel 2 goto ManualDNS 84 | if errorlevel 1 goto AutoDNS 85 | 86 | goto Menu 87 | 88 | :AutoDNS 89 | echo 请选择以下操作: 90 | echo [1] 开启去广告doh DNS加密 91 | echo [2] 开启干净doh DNS加密 92 | 93 | choice /C 12 /N /M "请输入操作序号:" 94 | 95 | if errorlevel 2 goto AutoDNS_addnsdoh 96 | if errorlevel 1 goto AutoDNS_dnsdoh 97 | 98 | goto Menu 99 | 100 | :AutoDNS_addnsdoh 101 | :: 开启去广告doh DNS加密 102 | echo 请选择一个网络接口(输入数字): 103 | setlocal enabledelayedexpansion 104 | set i=0 105 | 106 | :: 初始化变量 107 | set interfaceName= 108 | 109 | :: 循环显示网络接口列表 110 | for /f "tokens=2 delims==:" %%a in ('wmic nic where "NetConnectionStatus=2 and AdapterTypeId=0" get NetConnectionID /format:list') do ( 111 | set /a i+=1 112 | set "interfaceName[!i!]=%%a" 113 | echo !i!. %%a 114 | ) 115 | 116 | :: 等待用户输入 117 | set /p choice=请输入操作序号: 118 | 119 | :: 将用户输入的数字转换为网络接口名称 120 | set interfaceName=!interfaceName[!choice!]! 121 | 122 | :: 输出用户选择的网络接口名称 123 | echo 你选择的网络接口是 %interfaceName% 124 | 125 | :: 检测本地DNS服务器地址 126 | echo 检测本地DNS服务器地址: 127 | ipconfig /all | findstr /R "DNS\ Servers" 128 | ipconfig /all | findstr /R "DNS Servers\ [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" > local-dns.txt 129 | 130 | echo 正在开启DNS代理... 131 | echo 正在设置dnsproxy服务 132 | nssm.exe start dnsproxy.exe -l "%primaryDNS%" -l "%secondaryDNS%" -p 53 -b local-dns.txt -b 114.114.114.114 -u "!file[%choice%]!" --all-servers --edns --edns-addr=0.0.0.0 --cache --cache-optimistic 133 | 134 | goto Menu 135 | :AutoDNS_dnsdoh 136 | :: 开启干净doh DNS加密 137 | echo 请选择一个网络接口(输入数字): 138 | setlocal enabledelayedexpansion 139 | set i=0 140 | 141 | :: 初始化变量 142 | set interfaceName= 143 | 144 | :: 循环显示网络接口列表 145 | for /f "tokens=2 delims==:" %%a in ('wmic nic where "NetConnectionStatus=2 and AdapterTypeId=0" get NetConnectionID /format:list') do ( 146 | set /a i+=1 147 | set "interfaceName[!i!]=%%a" 148 | echo !i!. %%a 149 | ) 150 | 151 | :: 等待用户输入 152 | set /p choice=请输入操作序号: 153 | 154 | :: 将用户输入的数字转换为网络接口名称 155 | set interfaceName=!interfaceName[!choice!]! 156 | 157 | :: 输出用户选择的网络接口名称 158 | echo 你选择的网络接口是 %interfaceName% 159 | 160 | :: 检测本地DNS服务器地址 161 | echo 检测本地DNS服务器地址: 162 | ipconfig /all | findstr /R "DNS\ Servers" 163 | ipconfig /all | findstr /R "DNS Servers\ [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" > local-dns.txt 164 | 165 | goto Menu 166 | 167 | :ManualDNS 168 | :: 开启手工开启DNS加密的代码 169 | echo 请选择一个网络接口(输入数字): 170 | setlocal enabledelayedexpansion 171 | set i=0 172 | 173 | :: 初始化变量 174 | set interfaceName= 175 | 176 | :: 循环显示网络接口列表 177 | for /f "tokens=2 delims==:" %%a in ('wmic nic where "NetConnectionStatus=2 and AdapterTypeId=0" get NetConnectionID /format:list') do ( 178 | set /a i+=1 179 | set "interfaceName[!i!]=%%a" 180 | echo !i!. %%a 181 | ) 182 | 183 | :: 等待用户输入 184 | set /p choice= 185 | 186 | :: 将用户输入的数字转换为网络接口名称 187 | set interfaceName=!interfaceName[%choice%]! 188 | 189 | :: 输出用户选择的网络接口名称 190 | echo 你选择的网络接口是 %interfaceName% 191 | 192 | set /a count=0 193 | 194 | :: 初始化变量 195 | set file= 196 | 197 | :: 循环显示dns文件列表 198 | for /f "delims=" %%i in ('dir /b *.txt') do ( 199 | set /a count+=1 200 | set "file[!count!]=%%i" 201 | echo !count!. %%i 202 | ) 203 | 204 | :: 显示选择DNS服务器列表文件的提示 205 | echo 请选择DNS服务器列表文件(输入数字): 206 | set /p choice= 207 | 208 | echo 检测本地DNS服务器地址: 209 | ipconfig /all | findstr /R "DNS\ Servers" 210 | ipconfig /all | findstr /R "DNS Servers\ [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" > local-dns.txt 211 | 212 | echo 请输入你想要设置的主DNS服务器IP地址: 213 | set /p primaryDNS= 214 | echo 请输入你想要设置的备用DNS服务器IP地址: 215 | set /p secondaryDNS= 216 | 217 | echo 正在开启DNS代理... 218 | echo 正在设置dnsproxy服务 219 | nssm.exe start dnsproxy.exe -l "%primaryDNS%" -l "%secondaryDNS%" -p 53 -b local-dns.txt -b 114.114.114.114 -u "!file[%choice%]!" --all-servers --edns --edns-addr=0.0.0.0 --cache --cache-optimistic 220 | 221 | echo 正在设置dns ip.. 222 | netsh interface ipv4 set dns name="%interfaceName%" static %primaryDNS% primary 223 | netsh interface ipv4 add dns name="%interfaceName%" %secondaryDNS% index=2 224 | 225 | echo DNS服务器已设置为: 226 | echo 主DNS服务器: %primaryDNS% 227 | echo 备用DNS服务器: %secondaryDNS% 228 | 229 | goto Menu 230 | 231 | :RestoreDNS 232 | :: 还原DNS的代码 233 | 234 | goto Menu 235 | pause 236 | -------------------------------------------------------------------------------- /file/wx/WXDatConvter.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Potterli20/file/d3c78cbb620cdb0e8a039bbdbe0a4516396abe1b/file/wx/WXDatConvter.exe -------------------------------------------------------------------------------- /file/wx/说明.txt: -------------------------------------------------------------------------------- 1 | [更新]V0.5 2 | 1. 支持子文件夹解密(选择微信Image或MsgAttch目录后, 自动解密目录下所有dat) 3 | 2. 几个小BUG修复 4 | 5 | [更新]V0.4 6 | 1. 增加识别方案(两种方案识别, 动态切换) 7 | 2. 提高转换速度(识别出第一张图片的加密参数后, 不再识别后续图片加密参数, 减少unknown概率) 8 | 3. 显示加密参数(识别出加密参数后, 将加密参数显示在界面中, 方便查看) 9 | 10 | [更新]V0.3 11 | 1. 提高了自动图片识别的准确性 12 | 13 | [更新]V0.2 14 | 1. 修正了一个跳出注册码的问题 15 | 16 | 软件介绍: 17 | 微信PC版存储的本地文件格式为DAT格式, 而且是加密过的, 解密方法也很简单, 但网上有很多工具, 要么是只有源代码, 要么是JAVA或C#, 都需要运行库, 我用Delphi写了个, 不需要运行库, Win可以直接运行. 18 | 19 | 这个工具可以自动识别后缀, 也支持自动获取加密数, 如果想自己设置加密数, 可以去搜一搜相关文章, 有很多方法. 20 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | file-git 文件服务 以及 说明 8 | 29 | 35 | 36 | 37 | 38 | 39 |
40 | 101 | 102 |
浏览量/views:👀 | 103 | 访客数/visitors:👦
104 |
105 | 106 | 107 | --------------------------------------------------------------------------------