Commit 2cd395d
committed
fix(proxy): suppress HTTPS DNS hints with QUIC blocked
When block_quic is enabled, browsers should move to the TCP proxy path as early as possible instead of spending retry time on HTTP/3 discovery. SOCKS5 UDP already drops UDP/443 datagrams, but modern clients can learn HTTP/3 availability before opening UDP by querying DNS HTTPS or SVCB records over UDP/53.
Add a local DNS classifier in the SOCKS5 UDP relay for single-question IN queries of type HTTPS (65) and SVCB (64). Matching queries receive an empty successful DNS response with the original question preserved and all answer, authority, and additional counts cleared. Ordinary A/AAAA and multi-question queries continue through the existing UDP tunnel path unchanged.
The suppression only runs when block_quic is active and only on UDP target port 53. It does not change CONNECT handling, TCP DNS, DoH bypass/block policy, Full-mode UDP support, or the existing silent UDP/443 drop contract. Local counters record suppressed HTTPS/SVCB hints and dropped QUIC datagrams for diagnostics.
Add focused unit coverage for HTTPS suppression, SVCB suppression, non-suppression of A queries, and refusal to rewrite multi-question packets.1 parent 40b5386 commit 2cd395d
2 files changed
Lines changed: 159 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
| 393 | + | |
| 394 | + | |
393 | 395 | | |
394 | 396 | | |
395 | 397 | | |
| |||
626 | 628 | | |
627 | 629 | | |
628 | 630 | | |
| 631 | + | |
| 632 | + | |
629 | 633 | | |
630 | 634 | | |
631 | 635 | | |
| |||
778 | 782 | | |
779 | 783 | | |
780 | 784 | | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
781 | 789 | | |
782 | 790 | | |
783 | 791 | | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
784 | 801 | | |
785 | 802 | | |
786 | 803 | | |
| |||
4831 | 4848 | | |
4832 | 4849 | | |
4833 | 4850 | | |
| 4851 | + | |
| 4852 | + | |
| 4853 | + | |
| 4854 | + | |
| 4855 | + | |
4834 | 4856 | | |
4835 | 4857 | | |
4836 | 4858 | | |
| |||
4864 | 4886 | | |
4865 | 4887 | | |
4866 | 4888 | | |
4867 | | - | |
| 4889 | + | |
4868 | 4890 | | |
4869 | 4891 | | |
4870 | 4892 | | |
| |||
4876 | 4898 | | |
4877 | 4899 | | |
4878 | 4900 | | |
| 4901 | + | |
| 4902 | + | |
4879 | 4903 | | |
4880 | 4904 | | |
4881 | 4905 | | |
| |||
4888 | 4912 | | |
4889 | 4913 | | |
4890 | 4914 | | |
4891 | | - | |
| 4915 | + | |
4892 | 4916 | | |
4893 | 4917 | | |
4894 | 4918 | | |
| |||
4905 | 4929 | | |
4906 | 4930 | | |
4907 | 4931 | | |
| 4932 | + | |
| 4933 | + | |
4908 | 4934 | | |
4909 | 4935 | | |
4910 | 4936 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
924 | 924 | | |
925 | 925 | | |
926 | 926 | | |
927 | | - | |
| 927 | + | |
928 | 928 | | |
929 | 929 | | |
930 | 930 | | |
| |||
1095 | 1095 | | |
1096 | 1096 | | |
1097 | 1097 | | |
| 1098 | + | |
1098 | 1099 | | |
1099 | 1100 | | |
1100 | 1101 | | |
| |||
1190 | 1191 | | |
1191 | 1192 | | |
1192 | 1193 | | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
1193 | 1211 | | |
1194 | 1212 | | |
1195 | 1213 | | |
| |||
1207 | 1225 | | |
1208 | 1226 | | |
1209 | 1227 | | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
1210 | 1231 | | |
1211 | 1232 | | |
1212 | 1233 | | |
| |||
1596 | 1617 | | |
1597 | 1618 | | |
1598 | 1619 | | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
1599 | 1683 | | |
1600 | 1684 | | |
1601 | 1685 | | |
| |||
3501 | 3585 | | |
3502 | 3586 | | |
3503 | 3587 | | |
| 3588 | + | |
| 3589 | + | |
| 3590 | + | |
| 3591 | + | |
| 3592 | + | |
| 3593 | + | |
| 3594 | + | |
| 3595 | + | |
| 3596 | + | |
| 3597 | + | |
| 3598 | + | |
| 3599 | + | |
| 3600 | + | |
| 3601 | + | |
| 3602 | + | |
| 3603 | + | |
| 3604 | + | |
| 3605 | + | |
| 3606 | + | |
| 3607 | + | |
| 3608 | + | |
| 3609 | + | |
| 3610 | + | |
| 3611 | + | |
| 3612 | + | |
| 3613 | + | |
| 3614 | + | |
| 3615 | + | |
| 3616 | + | |
| 3617 | + | |
| 3618 | + | |
| 3619 | + | |
| 3620 | + | |
| 3621 | + | |
| 3622 | + | |
| 3623 | + | |
| 3624 | + | |
| 3625 | + | |
| 3626 | + | |
| 3627 | + | |
| 3628 | + | |
| 3629 | + | |
| 3630 | + | |
| 3631 | + | |
| 3632 | + | |
| 3633 | + | |
3504 | 3634 | | |
3505 | 3635 | | |
3506 | 3636 | | |
| |||
0 commit comments