Giter VIP home page Giter VIP logo

domain-list-community's Introduction

Domain list community

This project manages a list of domains, to be used as geosites for routing purpose in Project V.

Purpose of this project

This project is not opinionated. In other words, it does NOT endorse, claim or imply that a domain should be blocked or proxied. It can be used to generate routing rules on demand.

Download links

Usage example

Each file in the data/ directory can be used as a rule in this format: geosite:filename.

"routing": {
  "domainStrategy": "IPIfNonMatch",
  "rules": [
    {
      "type": "field",
      "outboundTag": "Reject",
      "domain": [
        "geosite:category-ads-all",
        "geosite:category-porn"
      ]
    },
    {
      "type": "field",
      "outboundTag": "Direct",
      "domain": [
        "domain:v2ex.com",
        "domain:icloud.com",
        "domain:icloud-content.com",
        "domain:cdn-apple.com",
        "geosite:jsdelivr",
        "geosite:cn"
      ]
    },
    {
      "type": "field",
      "outboundTag": "Proxy-1",
      "domain": [
        "geosite:category-anticensorship",
        "geosite:category-media",
        "geosite:category-vpnservices"
      ]
    },
    {
      "type": "field",
      "outboundTag": "Proxy-2",
      "domain": [
        "geosite:category-dev"
      ]
    },
    {
      "type": "field",
      "outboundTag": "Proxy-3",
      "domain": [
        "geosite:geolocation-!cn"
      ]
    }
  ]
}

Structure of data

All data are under data/ directory. Each file in the directory represents a sub-list of domains, named by the file name. File content is in the following format.

# comments
include:another-file
domain:google.com @attr1 @att2
keyword:google
regex:www\.google\.com
full:www.google.com

Syntax:

  • Comment begins with #. It may begin anywhere in the file. The content in the line after # is treated as comment and ignored in production.
  • Inclusion begins with include:, followed by the file name of an existing file in the same directory.
  • Subdomain begins with domain:, followed by a valid domain name. The prefix domain: may be omitted.
  • Keyword begins with keyword:, followed by a string.
  • Regular expression begins with regex:, followed by a valid regular expression (per Golang's standard).
  • Full domain begins with full:, followed by a complete and valid domain name.
  • Domains (including domain, keyword, regex and full) may have one or more attributes. Each attribute begins with @ and followed by the name of the attribute.

How it works

The entire data directory will be built into an external geosite file for Project V. Each file in the directory represents a section in the generated file.

To generate a section:

  1. Remove all the comments in the file.
  2. Replace include: lines with the actual content of the file.
  3. Omit all empty lines.
  4. Generate each domain: line into a sub-domain routing rule.
  5. Generate each keyword: line into a plain domain routing rule.
  6. Generate each regex: line into a regex domain routing rule.
  7. Generate each full: line into a full domain routing rule.

How to organize domains

File name

Theoretically any string can be used as the name, as long as it is a valid file name. In practice, we prefer names for determinic group of domains, such as the owner (usually a company name) of the domains, e.g., "google", "netflix". Names with unclear scope are generally unrecommended, such as "evil", or "local".

Attributes

Attribute is useful for sub-group of domains, especially for filtering purpose. For example, the list of "google" domains may contains its main domains, as well as domains that serve ads. The ads domains may be marked by attribute "@ads", and can be used as "geosite:google@ads" in V2Ray routing.

Contribution guideline

  • Please begin with small size PRs, say modification in a single file.
  • A PR must be reviewed and approved by another member.
  • After a few successful PRs, you may apply for manager access of this repository.

domain-list-community's People

Contributors

2509222540 avatar 8dxfpt avatar akiirui avatar banrikun avatar darienraymond avatar epliar avatar eycorsican avatar funray avatar gordon-zhao avatar hiiragiyuriko avatar kslr avatar lijingqing avatar loyalsoldier avatar m2kar avatar maddie avatar mzz2017 avatar opportunityliu avatar pragmatwice avatar qin-nz avatar rhjdvsgsgks avatar rikkix avatar rosebe avatar sdjdd avatar sitischu avatar techciel avatar toutyrater avatar victoriaraymond avatar whyou avatar xjasonlyu avatar zzqqbs 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.