Commit graph

14 commits

Author SHA1 Message Date
世界
1ab008e1e6
Improve error messages for Linux TUN and redirect operations 2026-03-15 14:43:38 +08:00
世界
caaf8469e0
Fix auto_redirect dropping SO_BINDTODEVICE traffic
REDIRECT in the OUTPUT chain rewrites the destination to 127.0.0.1,
then ip_route_me_harder() reroutes with the socket's bound interface
constraint (flowi4_oif). Since 127.0.0.1 is only reachable via lo,
the routing lookup fails and the packet is silently dropped.

Add a fallback routing table with `local 127.0.0.1` entries for each
non-loopback interface. When the local table lookup fails due to OIF
mismatch, the fallback table provides a matching RTN_LOCAL route.
The kernel then overrides dev_out to loopback (route.c:2857), so the
packet is delivered locally to the redirect server as intended.

This fixes NetworkManager connectivity checks and other tools that
use SO_BINDTODEVICE (e.g. curl --interface).
2026-03-11 21:15:11 +08:00
世界
a5db80d710
Fix nfqueue fallback when kernel module unavailable 2025-12-31 03:47:36 +08:00
世界
a850c4f8a1
Add pre-matching support for auto redirect 2025-12-26 14:44:55 +08:00
世界
20161f3059
redirect: Fix compatibility with /product/bin/su 2025-10-21 20:41:16 +08:00
世界
31e29f93cc
redirect: Remove iptables rules except basic output redirect for Android 2025-04-12 12:07:23 +08:00
世界
8cc5351bb3
auto-redirect: Move initialize to start 2025-02-06 08:44:55 +08:00
世界
99eea00432
Update network handler usages 2024-11-08 12:15:37 +08:00
世界
5d440412ba
auto-redirect: Fix nftables available check 2024-07-04 13:18:26 +08:00
世界
9cf07a2b47
auto-redirect: Cleanup before start 2024-06-17 22:38:34 +08:00
世界
85f5f2dd58
auto-redirect: Add route address set support for nftables 2024-06-16 15:37:27 +08:00
世界
85fe25a592
Improve nftables rules 2024-06-11 21:12:08 +08:00
世界
65383d3c39
Make DNS hijack optional 2024-06-07 15:49:16 +08:00
世界
67a5b408ef
Add auto-redirect 2024-06-07 15:48:43 +08:00