112 Commits

Author SHA1 Message Date
yaling888
db2b5db2c6
Fix: should check all ips need to fallback (#2915) 2023-09-02 20:56:42 +08:00
Jiahao Lu
45c10a17a6
Fix: DNS NCACHE TTL and OPT RRs (#2900)
* Fix: DNS NCACHE TTL and OPT RRs

1. DNS NCACHE was not correctly implemented.
2. OPT RRs must not be cached or forwarded.

Closes #2889.
2023-08-24 23:28:04 +08:00
Jiahao Lu
e1ec0d25a6
Fix: DNS cache max-age (#2850)
Regarding DNS cache, it's advisable to not rely on the TTL values
mentioned in the Ns and Extra sections. Otherwise, any DNS queries
that do not yield any results (such as for non-existent.example.com)
will be accidentally cached.

The need for the ACME challenge hack has been eliminated and as
such, it has been removed.
2023-07-29 13:18:12 +08:00
Dreamacro
c1d027d6d1 Fix: mapping dns should not stale 2023-07-27 21:23:08 +08:00
Terry Chan
18c666a1ab
Fix: aysnc exchange with new context (#2788) 2023-06-13 23:44:48 +08:00
KaitoHH
257fcef0b8
Fix: adjust DNS TTL values based on minimum value (#2706)
This commit adds an updated function that adjusts
the TTL values of DNS records are based on the minimum TTL
the value found in the records list so that all records share the
same TTL value. This ensures consistency in the cache
expiry time for all records to prevent caching issues.
2023-04-30 12:18:20 +08:00
Jiahao Lu
8f9b39c62e
Fix: potential panic in putMsgToCache (#2634)
When the upstream DNS server returns a message that contains no
questions (i.e. QDCOUNT == 0), `putMsgToCache` will trigger an
out-of-range panic.

Issue: #2524
Comment: https://github.com/Dreamacro/clash/issues/2524#issuecomment-1477477601
2023-03-21 19:36:49 +08:00
Jeff An
3b1d319820
Feature: add support for dns search domains (#2597) 2023-03-17 15:53:06 +08:00
Dreamacro
9af6d498e7 Change: remove redir-host as config 2023-02-01 15:19:36 +08:00
ALICE
4a57917783
Chore: skip cache acme challenge dns msg (#2469) 2022-12-22 13:30:23 +08:00
Dreamacro
a3281712e2 Chore: reduce dhcp dns client cost 2022-08-24 21:36:19 +08:00
Dreamacro
6e058f8581 Chore: remove old cache implementation 2022-08-17 11:43:20 +08:00
Dreamacro
3946d771e5 Feature: sync missing resolver logic from premium, but still net.IP on opensource 2022-08-13 13:07:35 +08:00
Skyxim
93400cf44d
Fix: ALPN should on DoH instead of DoT (#2232) 2022-07-25 12:41:22 +08:00
Hongqi Yu
c1285adbf8
Feature: can set custom interface for dns nameserver (#2126) 2022-06-01 10:50:54 +08:00
Dreamacro
6a661bff0c Migration: go 1.18 2022-03-16 12:10:13 +08:00
Dreamacro
d237b041b3 Fix: ignore empty dns server error 2022-01-05 11:41:31 +08:00
Kr328
7267c58913
Chore: ReCreate* do side effect job (#1849) 2021-12-26 22:08:53 +08:00
Dreamacro
81d5da51a3 Fix: unexpected proxy dial behavior on mapping mode 2021-10-18 21:08:27 +08:00
Dreamacro
13bd601cac Fix: #1660 panic 2021-10-11 21:05:38 +08:00
Dreamacro
3d5681cffd
Feature: persistence fakeip (#1662) 2021-10-11 20:48:58 +08:00
Dreamacro
f1cf7e9269 Style: use gofumpt for fmt 2021-10-10 23:44:09 +08:00
Dreamacro
4ce35870fe Chore: remove deprecated ioutil 2021-10-09 20:35:06 +08:00
beyondkmp
1996bef9e6
Chore: doh request should with id 0 (#1660) 2021-10-07 22:57:55 +08:00
Dreamacro
b9d470cf79 Fix: dhcp client should request special interface 2021-10-05 13:31:19 +08:00
Dreamacro
55600c49c9 Fix: potential pitfalls 2021-09-13 23:58:48 +08:00
Kr328
a5b950a779
Feature: add dhcp type dns client (#1509) 2021-09-06 23:07:34 +08:00
Loyalsoldier
a20b9a3960
Chore: make geoip match case-insensitive (#1574) 2021-08-29 22:19:22 +08:00
Dreamacro
e0d3f926b7 Feature: add geoip-code option 2021-08-25 15:15:13 +08:00
Dreamacro
571d2a0075 Migration: go 1.17 2021-08-18 13:26:23 +08:00
Dreamacro
995aa7a8fc Fix: remove ClientSessionCache and add NextProtos for vmess to fix #1468 2021-07-03 20:34:44 +08:00
Indust
3ca5d17c40
Fix: enable DNS server message compression (#1451) 2021-06-24 13:38:44 +08:00
Rusty Pen
0778591524
Feature: dns resolve domain through nameserver-policy (#1406) 2021-05-19 11:17:35 +08:00
Dreamacro
d0c829c578 Fix: domain dns should follow hosts config, close #1318 2021-04-01 21:20:44 +08:00
Dreamacro
4ad9761b32 Fix: don't resolve AAAA record when ipv6 is false and use go dns resolver 2021-04-01 18:03:30 +08:00
Dreamacro
f4de055aa1 Refactor: make inbound request contextual 2021-01-23 14:58:09 +08:00
Dreamacro
6fedd7ec84 Fix: dns client should not bind local address 2021-01-04 00:51:53 +08:00
Dreamacro
d3bb4c65a8 Fix: missing fake-ip record should return error 2020-10-17 12:52:43 +08:00
Dreamacro
bc52f8e4fd Chore: return empty record in SVCB/HTTPSSVC on fake-ip mode 2020-10-13 00:15:49 +08:00
Dreamacro
d3b14c325f Fix: the priority of fake-ip-filter 2020-10-09 00:04:24 +08:00
Melvin
a6444bb449
Feature: support domain in fallback filter (#964) 2020-09-28 22:17:10 +08:00
Kr328
558ac6b965
Chore: split enhanced mode instance (#936)
Co-authored-by: Dreamacro <305009791@qq.com>
2020-09-17 10:48:42 +08:00
Dreamacro
a32ee13fc9 Feature: reuse dns resolver cache when hot reload 2020-08-31 00:32:18 +08:00
Dreamacro
5805334ccd Chore: pass staticcheck 2020-08-25 22:19:59 +08:00
Kr328
89cf06036d
Feature: dns server could lookup hosts (#872) 2020-08-11 10:28:17 +08:00
Kr328
20eff200b1
Fix: dns should put msg to cache while exchangeWithoutCache (#820) 2020-07-20 21:16:36 +08:00
John Smith
02c7fd8d70
Fix: write msg cache multiple times (#812)
Co-authored-by: john.xu <john.xu@bytedance.com>
2020-07-17 17:34:40 +08:00
Dreamacro
60bad66bc3 Change: ipv6 logic 2020-06-18 18:11:02 +08:00
limgmk
99b34e8d8b
Fix: cannot listen socks5 port on wsl (#748) 2020-06-15 10:34:15 +08:00
Kr328
9f1d85ab6e
Fix: fake-ip-filter on fakeip mode should lookup ip-host mapping (#743) 2020-06-14 00:41:53 +08:00