v2ray-core icon indicating copy to clipboard operation
v2ray-core copied to clipboard

建议能否将fakeip的ttl值设置为1

Open kulongwangzhi85 opened this issue 4 years ago • 4 comments

V2Ray 5.1.0 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.19 linux/amd64) A unified platform for anti-censorship.

通过抓包查看到,使用里fakeip的ttl为600秒,是不是太大了? 标准fakeip的ttl=1 ??

主要是因为在使用第三方dns服务器时,无法单独关闭对fakeip的缓存。 这样只能将v2ray 的dns方在第三方dns前

本想术业有专攻,将第三方dns服务器放前,v2ray只解析gfw的fakedns。

kulongwangzhi85 avatar Nov 09 '22 01:11 kulongwangzhi85

I suppose you want to use FakeDNS for a specific set of domains, and other real dedicated DNS resolver for the rest.

If that's the case, change TTL is probably not the right solution for your problem. Also, It is not ideal to make the dedicated DNS resolver to forward requests to the built-in DNS resolver because this may cause cache conflict and poisoning.

Instead, you should make the built-in DNS resolver response DNS requests of that set of domains with FakeIP and forwards the rest to dedicated DNS resolver.

{
  "dns": {
    "servers": [
      "localhost",
      {
        "address": "fakedns",
        "domains": [
          "geosite:geolocation-!cn"
        ]
      }
    ]
  }
}

I suggest you to read the whole configuration documentations to help you better understand V2Ray.


p.s. Unfortunately, your question looks like an XY problem.

mydogshitgold avatar Jan 22 '23 20:01 mydogshitgold

至少做成可配置项

moremorefun avatar Mar 02 '23 13:03 moremorefun

V2Ray's DNS has been refactored a lot, I think it can meet your needs.

AkinoKaede avatar May 18 '23 17:05 AkinoKaede

This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] avatar Sep 16 '23 01:09 github-actions[bot]