GithubHelp home page GithubHelp logo

jmichaelkane / chinadomainlist Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zwc456baby/chinadomainlist

0.0 1.0 0.0 3.95 MB

CN 域名列表,gfw white list ,可由所有人共同提交并完善

Python 80.02% HTML 19.98%

chinadomainlist's Introduction

CN 域名白名单列表

目前github上已有许多同类仓库,例如 gfw whiteList, 但是一些库的更新不够及时 此库最大的不同在于

白名单列表可由所有人进行维护,且每日更新


CN 白名单域名列表:

https://github.com/zwc456baby/ChinaDomainList/raw/master/whitelist.txt

说明

本程序会将提交的域名暂存到数据库中 每日凌晨4点自动将数据库中的域名列表输出到文件 并提交到 github 上

程序每日亦会遍历数据库,对其中保存的域名进行有效查询, 如果发现域名所对应的IP已经指向国外IP,则会从白名单中移除

目前程序不支持正则匹配的规则提交,仅支持域名,或者通配符

若要提交正则匹配的规则,需要将规则添加到 extwhitelist.txt 文件,每日自动生成规则时,会自动追加此文件内容

域名提交例子:

  • 提交: example.com

将会生成一行 : example.com 规则

将会生成一行: ||example.com 规则

  • 提交: https://example.com

将会生成一行: |example.com 规则

提交的 http://https:// 可以共存,能够同时生成 |example.com||example.com, 但是会覆盖掉 example.com

建议提交时,直接复制粘贴 url ,并按回车即可

使用方式

  • 安装 SwitchyOmega
  • 新建情景模式,自动切换模式
  • 添加规则列表:https://github.com/zwc456baby/ChinaDomainList/raw/master/whitelist.txt
  • 默认情景模式选代理,规则列表选择直连

如何提交域名

点击直达提交网页

在网页输入框中输入域名后,回车提交即可

程序如何判定域名的?

程序是如何判定域名是否位于CN呢?通过以下步骤:

  1. 抓取公共的IP归属列表
  2. 对提交的域名解析其IP地址
  3. 判定IP地址是否位于CN,如果是,则添加到白名单中

初始列表来源

使用其中的域名对数据库进行初始化 blackwhite

使用了其中的正则规则 gfw_whitelist

IP归属地抓取链接: http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest

ip归属地本地识别数据库: ip2region

chinadomainlist's People

Contributors

zhouzhouprogram avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.