Coder Social home page Coder Social logo

Comments (4)

chika0801 avatar chika0801 commented on August 31, 2024 2

没事呀,类似打比方在tun环境下,你代理节点的地址一栏填的是域名,问题来了你在tun模式下这域名要解析成ip,域名就进到dns里,这参数就在这时用。

from sing-box-examples.

chika0801 avatar chika0801 commented on August 31, 2024

https://github.com/chika0801/sing-box-examples/tree/main/Tun#%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9

它只对

以 Windows 客户端配置举例,若你的客户端配置中 "server" 是填的域名。域名进入 "dns" 部分,会命中下面的规则,将使用系统默认DNS将域名解析成IP。

就是出站中 tag proxy 你在地址server填域名才会命中它(反正我是习惯一直填vps的ip)

tun收到的域名请求是命中不了这规则的,代码原理我不懂,当时sb才加这参数我也不懂什么场景会用到,后来哪时看它群里有人在问,自己试了下后,写了上面一段话解释。这是我的理解。

from sing-box-examples.

chika0801 avatar chika0801 commented on August 31, 2024

所以 域名进dns规则部分从上到下,最后没命中,默认用第1个dns服务器即 https://github.com/chika0801/sing-box-examples/blob/main/Tun/config_client_windows_fakeip.json#L9

类似这些小地方我觉得懂的都懂我也不想写复杂的说明,(反正按我喜欢的逻辑,我倒是考量过的)

from sing-box-examples.

chise0713 avatar chise0713 commented on August 31, 2024

啊啊,是我不知道只有在outbound是直连时才会命中 any 兜底。现在明白了,抱歉。

from sing-box-examples.

Related Issues (20)

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.