Comments (5)
tag:none 和 gfwlist 分流模式是如何联系起来的?
我没有理解你对 chinadns-ng 的具体用例,麻烦详细说明下。
from chinadns-ng.
感谢回复
其实问题是这样的,我现在用黑名单模式翻墙,在黑名单里面的dns解析出来之后的ip会加到一个gfwlist的ipset里面
这个很好
但是黑名单模式是不全的,如果碰到那些实际上被墙但是又没有在黑名单里面的网站,我有两种方法
- 手动添加这些网站到一个列表里面,放到tag:gfwlist里面,chinadns就会用国外dns解析,并且自动添加进ipset里面
- 或者chinadns当知道解析的结果是一个国外ip的时候, 增加一个选项,将这个ip添加进ipset里面
对比这两种方案,2)会更加方便一点,虽然存在误杀的可能(虽然国外ip,但是没有被墙)。但是鉴于现在的网络环境,基本上国外网站都被墙的7788了,2)这种方式会更好一些
from chinadns-ng.
按照我的理解,你说的方式2,完全等于 chnroute 分流模式,你可以看下 ss-tproxy 中 chinadns-ng 的使用。
要实现该需求,完全不必给 tag:none 添加 add-ip-to-set 功能。为什么?
- 因为 tag:none 判断一个 ip 是否为国外 ip 的核心依据就是:检测这个 ip 在不在 chnroute/chnroute6 集合中(--ipset-name4/6 选项指定的 ipset/nftset),ip 不在集合里面,那就是国外 ip。
- 同理,你在 iptables 规则中,同样可以依赖这一点,也即
-m set ! --match-set chnroute dst -j PROXY
,假设 PROXY 是执行透明代理的规则链,该规则的意思是,如果目标ip不在chnroute里面,那么就走 PROXY 链。
from chinadns-ng.
本质上,这还是对 gfwlist 模式、chnroute 模式的选择,方式1 就是 gfwlist 模式,方式2 就是 chnroute 模式。
以下是 ss-tproxy 中,对 global/gfwlist/chnroute 模式的定义。
from chinadns-ng.
明白了,感谢解答
饶了一大圈发现最后还是跟白名单模式一样
from chinadns-ng.
Related Issues (20)
- tag 的说明和功能的例子是混淆了? HOT 2
- --add-tagchn-ip 选项可否设置黑名单 HOT 17
- 对于不支持tcp查询的上游,请带上`udp://`限定 HOT 12
- 是否个例:域名层级问题 HOT 3
- 使用 chinadns-ng 替代 dnsmasq 时,需要注意的事项 HOT 81
- 环境有问题,DNS解析存在“污染” HOT 60
- 24.4.13版本用不了 ,是改变什么吗 HOT 3
- 增加-Dwolfssl编译不过去 HOT 7
- wolfssl 在某些平台上无法正确校验 SSL 证书 HOT 10
- tag有可能支持geosite吗 HOT 1
- 路由器上使用chinadns,一直日志里显示网络不可达 HOT 4
- 请问一下能否支持通过tcp/socks5访问上游 HOT 3
- 一点疑问 HOT 5
- oops, it's gone~ HOT 3
- trust-dns DoT Error:[Upstream.zig:822 Group.parse_failed] invalid proto: 'tls://' HOT 2
- 能同时监听多个端口吗? HOT 6
- 支持bridge协议添加到set HOT 3
- TODO HOT 5
- 能否优化下dns查询的分组机制,防止ddos。 HOT 5
- 【兼容性】对于收到的每个 query msg,都尽量进行”回复“,即使是 bad msg HOT 27
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chinadns-ng.