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

Add Dns Proxy Response TTL Control #3323

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xiaokangwang
Copy link
Contributor

This pull request adds 2 new options for dns proxy protocol.

It allows the adjustment of ttl for dns message output with configuration.

  bool override_response_ttl = 4;
  uint32 response_ttl = 3;

@4-FLOSS-Free-Libre-Open-Source-Software
Copy link
Contributor

This option would be useful to be able to specify the “FakeDNS” answer's expiration TTL.

For real DNS records TTL there are domains with low as 30 seconds. Which was currently expanded to 20x of its specified TTL.
For example, dynamic DNS domains or dns.msftncsi.com.

This TTL Control fixes:

The other current behavior with the DNS protocol is, that if you once request a domain such as v2fly.org which is TTL 300, If you will request it within the 300 seconds, again, v2fly will always answer with the same static TTL value (600) again. In depended on if the cached value was about to expire within the same time.

This means, the current default TTL of 600 is always 10 minutes in time, independent of v2fly DNS cache is about to expire it record. The TTL value ins answers never decreases. But this would be another issue.

With the new option, one could set a sane lower TTL value at least.

@xiaokangwang
Copy link
Contributor Author

It is not possible to reply with different TTL for dns request originated from different servers, as the current design does not the dns user to know the origin of the reply. I think the option to reply with a lower ttl should be a low hanging fruit for us.

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

Successfully merging this pull request may close these issues.

2 participants