Clash 规则配置解析:DOMAIN、GEOIP、MATCH 是什么意思?
The article explains the configuration rules in Clash, focusing on DOMAIN, GEOIP, and MATCH. It details how these rules determine the routing of traffic, whether it should connect directly, be proxied, or rejected. The rules are matched in order, with specific rules taking precedence over more general ones.
- ▪Clash configuration rules dictate how different types of traffic are handled.
- ▪DOMAIN-SUFFIX matches any domain ending with a specified suffix, while DOMAIN requires an exact match.
- ▪GEOIP rules direct traffic based on the geographical location of the target IP.
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 3731015) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } amoorzheyu Posted on May 19 Clash 规则配置解析:DOMAIN、GEOIP、MATCH 是什么意思? #vpn #匹配规则 在 Clash 配置文件中,rules 用来决定不同流量应该走直连、代理,还是被拦截。 例如下面这段配置: rules: - DOMAIN-SUFFIX,google.com,DIRECT - DOMAIN-KEYWORD,google,DIRECT - DOMAIN,google.com,DIRECT - DOMAIN-SUFFIX,ad.com,REJECT - GEOIP,CN,DIRECT - MATCH,DIRECT Enter fullscreen mode Exit fullscreen mode Clash 会按照规则从上到下依次匹配。 只要某一条规则匹配成功,就会使用这条规则,不再继续往下匹配。 DOMAIN-SUFFIX:匹配域名后缀 - DOMAIN-SUFFIX,google.com,DIRECT Enter fullscreen mode Exit fullscreen mode…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).