Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sing-box dns配置相关 #78

Open
luckyyyyy opened this issue Apr 6, 2024 · 0 comments
Open

sing-box dns配置相关 #78

luckyyyyy opened this issue Apr 6, 2024 · 0 comments

Comments

@luckyyyyy
Copy link
Owner

luckyyyyy commented Apr 6, 2024

运营商DNS虽然问题多,但依然对CDN来说是最优解,对于dns挟持问题,也可以用fakeip有效解决。

 "dns": {
    "disable_cache": false,
    "servers": [
      {
        "tag": "local",
        "address": "127.0.0.1",
        "detour": "🚀直接连接"
      },
      {
        "tag": "fakeip",
        "address": "fakeip",
        "strategy": "ipv4_only"
      },
      {
        "tag": "local_v4",
        "address": "127.0.0.1",
        "strategy": "ipv4_only",
        "detour": "🚀直接连接"
      },
      {
        "address": "rcode://refused",
        "tag": "reject"
      }
    ],
    "rules": [
      {
        "inbound": "dns-in",
        "disable_cache": false,
        "server": "reject",
        "query_type": [
          "HTTPS"
        ]
      },
      {
        "disable_cache": false,
        "rule_set": [
          "geosite-cn"
        ],
        "server": "local"
      },
      {
        "disable_cache": false,
        "rule_set": [
          "geoip-cn"
        ],
        "ip_cidr": [
          "10.0.0.1/8",
          "172.16.0.0/12",
          "192.168.0.0/16"
        ],
        "server": "local"
      },
      {
        "disable_cache": false,
        "outbound": "any",
        "server": "local"
      },
      {
        "inbound": "dns-in",
        "disable_cache": true,
        "rewrite_ttl": 1,
        "server": "fakeip",
        "query_type": [
          "A",
          "AAAA"
        ]
      }
    ],
    "final": "local",
    "disable_expire": false,
    "independent_cache": false,
    "reverse_mapping": false,
    "fakeip": {
      "enabled": true,
      "inet4_range": "198.18.0.0/15",
      "inet6_range": "fc00::/18"
    }
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant