From f6524bfbad49aa5628444c6c86d98ab9560d7b61 Mon Sep 17 00:00:00 2001 From: DaTekShaman Date: Sat, 27 Dec 2025 15:34:41 +0300 Subject: [PATCH] Add host entries to configuration and enhance iptables setup for MIHOMO --- config-clash/cadian/cadian.current.yaml | 5 +++++ scripts/iptables-mihomo-setup.sh | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/config-clash/cadian/cadian.current.yaml b/config-clash/cadian/cadian.current.yaml index f526457..6982189 100644 --- a/config-clash/cadian/cadian.current.yaml +++ b/config-clash/cadian/cadian.current.yaml @@ -40,6 +40,11 @@ lgbm-update-interval: 72 lgbm-url: "https://github.com/vernesong/mihomo/releases/download/LightGBM-Model/Model.bin" # model update url # ———————————————————————————————————————————————————————— HOSTS ———————————————————————————————————————————————————————— +hosts: + 'gitea.shamanlanding.org': '192.168.10.4' + 'niyya.shamanlanding.org': '192.168.10.4' + 'webway.shamanlanding.org': '192.168.10.4' + # ——————————————————————————————————————————————————————— PROFILE ——————————————————————————————————————————————————————— profile: store-selected: true diff --git a/scripts/iptables-mihomo-setup.sh b/scripts/iptables-mihomo-setup.sh index ecaf12a..09b0c71 100644 --- a/scripts/iptables-mihomo-setup.sh +++ b/scripts/iptables-mihomo-setup.sh @@ -42,6 +42,8 @@ ipt -t nat -X MIHOMO_REDIR 2>/dev/null || true ipt -t nat -F OUTPUT 2>/dev/null || true # Create chain +ipt -t nat -F MIHOMO_REDIR 2>/dev/null || true +ipt -t nat -X MIHOMO_REDIR 2>/dev/null || true ipt -t nat -N MIHOMO_REDIR # Exclude loopback and local subnets @@ -86,6 +88,8 @@ ipt -t mangle -F MIHOMO_TPROXY 2>/dev/null || true ipt -t mangle -X MIHOMO_TPROXY 2>/dev/null || true # Create chain +ipt -t mangle -F MIHOMO_TPROXY 2>/dev/null || true +ipt -t mangle -X MIHOMO_TPROXY 2>/dev/null || true ipt -t mangle -N MIHOMO_TPROXY # Exclusions: loopback/local subnets