[X] 这是 Mihomo 核心的问题,并非我所使用的 Mihomo 衍生版本(如 OpenMihomo、KoolMihomo 等)的特定问题 This is an issue of the Mihomo core per se, not to the derivatives of Mihomo, like OpenMihomo or KoolMihomo.
Mihomo version
Mihomo Meta v1.17.0 linux amd64 with go1.20.11 Sun Dec 3 01:03:59 UTC 2023
dig @8.8.8.8 www.google.com
;; communications error to 8.8.8.8#53: timed out
;; communications error to 8.8.8.8#53: timed out
;; communications error to 8.8.8.8#53: timed out
Description
这是iptables规则:
echo "clean firewall and allowing everyone..."
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
ip rule del fwmark 1 lookup 100
ip route del local 0.0.0.0/0 dev lo table 100
ip rule add fwmark 1 lookup 100
ip route add local 0.0.0.0/0 dev lo table 100
iptables -t mangle -N clash
iptables -t mangle -A clash -d 0.0.0.0/8 -j RETURN
iptables -t mangle -A clash -d 127.0.0.0/8 -j RETURN
iptables -t mangle -A clash -d 192.168.10.0/24 -j RETURN
iptables -t mangle -A clash -d 169.254.0.0/16 -j RETURN
iptables -t mangle -A clash -d 224.0.0.0/4 -j RETURN
iptables -t mangle -A clash -d 240.0.0.0/4 -j RETURN
iptables -t mangle -A clash -d 104.225.154.179 -j RETURN
iptables -t mangle -A clash -d 193.123.248.110 -j RETURN
iptables -t mangle -A clash -p tcp -j TPROXY --on-port 7895 --tproxy-mark 1
iptables -t mangle -A clash -p udp -j TPROXY --on-port 7895 --tproxy-mark 1
iptables -t mangle -A PREROUTING -p tcp -j clash
iptables -t mangle -A PREROUTING -p udp -j clash
iptables -t nat -A POSTROUTING -o br-lan -j MASQUERADE
iptables -t mangle -N clash_local
iptables -t mangle -A clash_local -d 0.0.0.0/8 -j RETURN
iptables -t mangle -A clash_local -d 127.0.0.0/8 -j RETURN
iptables -t mangle -A clash_local -d 192.168.10.0/24 -j RETURN
iptables -t mangle -A clash_local -d 169.254.0.0/16 -j RETURN
iptables -t mangle -A clash_local -d 224.0.0.0/4 -j RETURN
iptables -t mangle -A clash_local -d 240.0.0.0/4 -j RETURN
iptables -t mangle -A clash_local -d 104.225.154.179 -j RETURN
iptables -t mangle -A clash_local -d 193.123.248.110 -j RETURN
iptables -t mangle -A clash_local -p tcp -j MARK --set-mark 1
iptables -t mangle -A clash_local -p udp -j MARK --set-mark 1
iptables -t mangle -A OUTPUT -p tcp -m owner --uid-owner clash -j RETURN
iptables -t mangle -A OUTPUT -p udp -m owner --uid-owner clash -j RETURN
iptables -t mangle -A OUTPUT -p tcp -j clash_local
iptables -t mangle -A OUTPUT -p udp -j clash_local
Verify steps
Mihomo version
Mihomo Meta v1.17.0 linux amd64 with go1.20.11 Sun Dec 3 01:03:59 UTC 2023
What OS are you seeing the problem on?
Linux
Mihomo config
Mihomo log
Description
这是iptables规则: echo "clean firewall and allowing everyone..." iptables -F iptables -X iptables -t nat -F iptables -t nat -X iptables -t mangle -F iptables -t mangle -X iptables -P INPUT ACCEPT iptables -P FORWARD ACCEPT iptables -P OUTPUT ACCEPT ip rule del fwmark 1 lookup 100 ip route del local 0.0.0.0/0 dev lo table 100
ip rule add fwmark 1 lookup 100 ip route add local 0.0.0.0/0 dev lo table 100
iptables -t mangle -N clash iptables -t mangle -A clash -d 0.0.0.0/8 -j RETURN iptables -t mangle -A clash -d 127.0.0.0/8 -j RETURN iptables -t mangle -A clash -d 192.168.10.0/24 -j RETURN iptables -t mangle -A clash -d 169.254.0.0/16 -j RETURN iptables -t mangle -A clash -d 224.0.0.0/4 -j RETURN iptables -t mangle -A clash -d 240.0.0.0/4 -j RETURN iptables -t mangle -A clash -d 104.225.154.179 -j RETURN iptables -t mangle -A clash -d 193.123.248.110 -j RETURN iptables -t mangle -A clash -p tcp -j TPROXY --on-port 7895 --tproxy-mark 1 iptables -t mangle -A clash -p udp -j TPROXY --on-port 7895 --tproxy-mark 1 iptables -t mangle -A PREROUTING -p tcp -j clash iptables -t mangle -A PREROUTING -p udp -j clash iptables -t nat -A POSTROUTING -o br-lan -j MASQUERADE
iptables -t mangle -N clash_local iptables -t mangle -A clash_local -d 0.0.0.0/8 -j RETURN iptables -t mangle -A clash_local -d 127.0.0.0/8 -j RETURN iptables -t mangle -A clash_local -d 192.168.10.0/24 -j RETURN iptables -t mangle -A clash_local -d 169.254.0.0/16 -j RETURN iptables -t mangle -A clash_local -d 224.0.0.0/4 -j RETURN iptables -t mangle -A clash_local -d 240.0.0.0/4 -j RETURN iptables -t mangle -A clash_local -d 104.225.154.179 -j RETURN iptables -t mangle -A clash_local -d 193.123.248.110 -j RETURN iptables -t mangle -A clash_local -p tcp -j MARK --set-mark 1 iptables -t mangle -A clash_local -p udp -j MARK --set-mark 1 iptables -t mangle -A OUTPUT -p tcp -m owner --uid-owner clash -j RETURN iptables -t mangle -A OUTPUT -p udp -m owner --uid-owner clash -j RETURN iptables -t mangle -A OUTPUT -p tcp -j clash_local iptables -t mangle -A OUTPUT -p udp -j clash_local
不知道是为什么,dig @8.8.8.8 www.google.com dig @114.114.114.114 www.google.com 都不通,udp下行没有流量,数据无法返回,进了clashmeta之后就如同进入了黑洞一样,仔细检查了配置也没有发现有什么问题。不使用自建节点,换了机场的节点也不行,求助