parent
e0097b8f99
commit
33c801313a
@ -5,9 +5,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/MetaCubeX/mihomo.git
|
||||
PKG_SOURCE_DATE:=2025-01-15
|
||||
PKG_SOURCE_VERSION:=192d769f7587f333a3a0798e2f121be441a95c16
|
||||
PKG_MIRROR_HASH:=06654590011c34d5a4ad5aeec0568237c0660f60d611ebbf4b3cd285ac149730
|
||||
PKG_SOURCE_DATE:=2025-01-21
|
||||
PKG_SOURCE_VERSION:=b69e52d4d72846b8201a4073ed68c4c332c40db9
|
||||
PKG_MIRROR_HASH:=33ecc27b647a62920d752a877c1a2812d93ed375a332ceac6890b5b070c7aacc
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_MAINTAINER:=Joseph Mory <morytyann@gmail.com>
|
||||
@ -16,7 +16,7 @@ PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
|
||||
PKG_BUILD_VERSION:=alpha-192d769
|
||||
PKG_BUILD_VERSION:=alpha-b69e52d
|
||||
PKG_BUILD_TIME:=$(shell date -u -Iseconds)
|
||||
|
||||
GO_PKG:=github.com/metacubex/mihomo
|
||||
|
@ -47,6 +47,7 @@ config subscription 'subscription'
|
||||
option 'name' 'default'
|
||||
option 'url' 'http://example.com/default.yaml'
|
||||
option 'user_agent' 'clash'
|
||||
option 'prefer' 'remote'
|
||||
|
||||
config mixin 'mixin'
|
||||
option 'log_level' 'warning'
|
||||
|
@ -266,7 +266,7 @@ start_service() {
|
||||
fi
|
||||
if [ "$mixin_file_content" == 1 ]; then
|
||||
if [ -s "$MIXIN_FILE_PATH" ]; then
|
||||
yq ea -M -i '. as $item ireduce ({}; . * $item ) | ... comments=""' "$RUN_PROFILE_PATH" "$MIXIN_FILE_PATH"
|
||||
yq -M -i ea '. as $item ireduce ({}; . * $item ) | ... comments=""' "$RUN_PROFILE_PATH" "$MIXIN_FILE_PATH"
|
||||
fi
|
||||
fi
|
||||
# test profile
|
||||
@ -376,7 +376,7 @@ service_started() {
|
||||
local tun_interval; tun_interval=1
|
||||
while [ "$tun_timeout" -gt 0 ]; do
|
||||
if (ip link show dev "$tun_device" > /dev/null 2>&1); then
|
||||
if [ $(ip -json addr show dev mihomo | yq '.[] | select(.ifname = "mihomo") | .addr_info | length') -gt 0 ]; then
|
||||
if [ $(ip -json addr show dev mihomo | yq -M '.[] | select(.ifname = "mihomo") | .addr_info | length') -gt 0 ]; then
|
||||
log "Transparent Proxy" "Tun device is online."
|
||||
break
|
||||
fi
|
||||
@ -575,11 +575,11 @@ cleanup() {
|
||||
# delete hijack
|
||||
nft delete table inet "$FW_TABLE" > /dev/null 2>&1
|
||||
local handles handle
|
||||
handles=$(nft --json list table inet fw4 | yq '.nftables[] | select(has("rule")) | .rule | select(.chain == "input" and .comment == "mihomo") | .handle')
|
||||
handles=$(nft --json list table inet fw4 | yq -M '.nftables[] | select(has("rule")) | .rule | select(.chain == "input" and .comment == "mihomo") | .handle')
|
||||
for handle in $handles; do
|
||||
nft delete rule inet fw4 input handle "$handle"
|
||||
done
|
||||
handles=$(nft --json list table inet fw4 | yq '.nftables[] | select(has("rule")) | .rule | select(.chain == "forward" and .comment == "mihomo") | .handle')
|
||||
handles=$(nft --json list table inet fw4 | yq -M '.nftables[] | select(has("rule")) | .rule | select(.chain == "forward" and .comment == "mihomo") | .handle')
|
||||
for handle in $handles; do
|
||||
nft delete rule inet fw4 forward handle "$handle"
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user