跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[DNS] 给大家 show 一下我用的 nodejs 实现的 dns 方案

发表于
代码:
https://github.com/pagxir/dns-resolver-ng/

如果是在运行于国内使用(比如软路由上),则推荐配置如下:
const NameServers = {
nearby: { address: "::ffff:223.5.5.5", port: 53},
nearby6: { address: "2001:4860:4860::8888", port: 53},
global: { address: "64:ff9b::1.1.1.1", port: 53},
global6: { address: "64:ff9b::8.8.8.8", port: 53},
oiling: { address: "::ffff:202.12.30.131", port: 53},
};

const Config = {};
Config.oilingMode = "China";
Config.preferNat64 = true;
这里 nearby 推荐使用 ISP 的作为国内的上游 DNS ,用于解释国内 A 记录
这里 nearby6 推荐使用 dns.google ,用于解释国内 AAAA 记录
global ,global6 用于解释国外的 A 记录跟国外的 AAA 记录,最好通过隧道走远端的 VPS 。

如果是运行于国外,例如搭建 DOH ,则推荐配置:
const NameServers = {
nearby: { address: "::ffff:180.76.76.76", port: 53},
nearby6: { address: "2001:4860:4860::8888", port: 53},
global: { address: "::ffff:1.1.1.1", port: 53},
global6: { address: "::ffff:8.8.8.8", port: 53},
oiling: { address: "::ffff:202.12.30.131", port: 53},
};

const Config = {};
Config.oilingMode = "Global";
Config.preferNat64 = true; // 如果希望 IPv6,而不是 DNS64/NAT64 ,则修改为 false

最后的效果就是,国内域名会选择 ISP 的的结果,国外域名回选择 global 的解释结果。

不关注什么 DNS 泄漏,只关注正确的分流域名。

然后如果 Config.preferNat64 = ture ,需要正确配置一下 NAT64, 不过因为国外走 NAT64 ,这样完全不干扰本地 IPv4 网络,硬件加速也不会受到影响,本地 ipv4 能不能跑满跟你没有配置前一样。

即使本地网络没有 IPv6 也可以使用的,就是需要配置.

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.