From 405be4028bfc23014da16b46bc0a85d44262a192 Mon Sep 17 00:00:00 2001 From: spatiumstas <79056064+spatiumstas@users.noreply.github.com> Date: Tue, 9 Dec 2025 15:27:04 +0300 Subject: [PATCH 1/3] mihomo: add new package --- mihomo/Makefile | 76 ++++++++++++++++++++++++++++++++++++++++ mihomo/files/S99mihomo | 10 ++++++ mihomo/files/config.yaml | 4 +++ 3 files changed, 90 insertions(+) create mode 100644 mihomo/Makefile create mode 100644 mihomo/files/S99mihomo create mode 100644 mihomo/files/config.yaml diff --git a/mihomo/Makefile b/mihomo/Makefile new file mode 100644 index 0000000..2064415 --- /dev/null +++ b/mihomo/Makefile @@ -0,0 +1,76 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# Copyright (C) 2025 Entware + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mihomo +PKG_VERSION:=1.19.17 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/MetaCubeX/mihomo.git +PKG_SOURCE_VERSION:=v$(PKG_VERSION) +PKG_MIRROR_HASH:=27b0641d25b485cbff74f4cc6290adb3418e6a3e94e50137f59a8f62ddd1a27f + +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/golang.mk + +define Package/mihomo/Default + SECTION:=net + CATEGORY:=Network + SUBMENU:=Web Servers/Proxies + TITLE:=Mihomo (MetaCubeX) universal proxy + URL:=https://github.com/MetaCubeX/mihomo + MAINTAINER:=Entware team, https://entware.net + DEPENDS:=+ca-certificates +endef + +define Package/mihomo + $(call Package/mihomo/Default) + VARIANT:=hf +endef + +define Package/mihomo_nohf + $(call Package/mihomo/Default) + VARIANT:=nohf + DEPENDS:=+ca-certificates @arm +endef + +define Package/mihomo/description +Mihomo is a rule-based proxy platform written in Go. +endef + +Package/mihomo_nohf/description=$(Package/mihomo/description) + +define Package/mihomo/conffiles +/opt/etc/mihomo/config.yaml +endef + +Package/mihomo_nohf/conffiles=$(Package/mihomo/conffiles) + +XIMPORTPATH:=$(call tolower,$(XIMPORTPATH)) + +GO_LDFLAGS += \ + -X '$(XIMPORTPATH)/constant.Version=$(PKG_VERSION)' + +GO_TARGET:=./ + +define Package/mihomo/install + $(INSTALL_DIR) $(1)/opt/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/mihomo $(1)/opt/sbin/mihomo + $(INSTALL_DIR) $(1)/opt/etc/init.d + $(INSTALL_BIN) ./files/S99mihomo $(1)/opt/etc/init.d + $(INSTALL_DIR) $(1)/opt/etc/mihomo + $(INSTALL_CONF) ./files/config.yaml $(1)/opt/etc/mihomo +endef + +Package/mihomo_nohf/install=$(Package/mihomo/install) + +$(eval $(call BuildPackage,mihomo)) +$(eval $(call BuildPackage,mihomo_nohf)) diff --git a/mihomo/files/S99mihomo b/mihomo/files/S99mihomo new file mode 100644 index 0000000..f74da23 --- /dev/null +++ b/mihomo/files/S99mihomo @@ -0,0 +1,10 @@ +#!/bin/sh + +ENABLED=yes +PROCS=mihomo +ARGS="-d /opt/etc/mihomo" +PREARGS="" +DESC=$PROCS +PATH=/opt/sbin:/opt/bin:/opt/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + +. /opt/etc/init.d/rc.func diff --git a/mihomo/files/config.yaml b/mihomo/files/config.yaml new file mode 100644 index 0000000..f3c8229 --- /dev/null +++ b/mihomo/files/config.yaml @@ -0,0 +1,4 @@ +tproxy-port: 1181 +redir-port: 1182 +# Setup documentation: +# https://wiki.metacubex.one/en/config/ From a2ea9d5059f20f3dc544d5e33cc068851b120a2b Mon Sep 17 00:00:00 2001 From: spatiumstas <79056064+spatiumstas@users.noreply.github.com> Date: Fri, 12 Dec 2025 00:53:06 +0300 Subject: [PATCH 2/3] mihomo: bump to 1.19.21 --- mihomo/Makefile | 12 +++++++----- mihomo/files/S99mihomo | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/mihomo/Makefile b/mihomo/Makefile index 2064415..cdb4994 100644 --- a/mihomo/Makefile +++ b/mihomo/Makefile @@ -1,17 +1,17 @@ # SPDX-License-Identifier: GPL-2.0-only # -# Copyright (C) 2025 Entware +# Copyright (C) 2026 Entware include $(TOPDIR)/rules.mk PKG_NAME:=mihomo -PKG_VERSION:=1.19.17 +PKG_VERSION:=1.19.21 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/MetaCubeX/mihomo.git PKG_SOURCE_VERSION:=v$(PKG_VERSION) -PKG_MIRROR_HASH:=27b0641d25b485cbff74f4cc6290adb3418e6a3e94e50137f59a8f62ddd1a27f +PKG_SOURCE_URL:=https://github.com/MetaCubeX/mihomo +PKG_MIRROR_HASH:=1ee4e5f471d3f31043fde27441b47d39d3df0814a36ee18a05466b13348c0512 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE @@ -57,9 +57,11 @@ Package/mihomo_nohf/conffiles=$(Package/mihomo/conffiles) XIMPORTPATH:=$(call tolower,$(XIMPORTPATH)) GO_LDFLAGS += \ - -X '$(XIMPORTPATH)/constant.Version=$(PKG_VERSION)' + -X '$(XIMPORTPATH)/constant.Version=$(PKG_VERSION)' \ + -X '$(XIMPORTPATH)/constant.BuildTime=' GO_TARGET:=./ +GO_TAGS:=with_gvisor define Package/mihomo/install $(INSTALL_DIR) $(1)/opt/sbin diff --git a/mihomo/files/S99mihomo b/mihomo/files/S99mihomo index f74da23..e285472 100644 --- a/mihomo/files/S99mihomo +++ b/mihomo/files/S99mihomo @@ -2,7 +2,7 @@ ENABLED=yes PROCS=mihomo -ARGS="-d /opt/etc/mihomo" +ARGS="-d /opt/etc/$PROCS" PREARGS="" DESC=$PROCS PATH=/opt/sbin:/opt/bin:/opt/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin From 6fef43a4197ad6ca6034fdeeb993e0d3de75d398 Mon Sep 17 00:00:00 2001 From: spatiumstas <79056064+spatiumstas@users.noreply.github.com> Date: Wed, 1 Apr 2026 10:25:30 +0300 Subject: [PATCH 3/3] mihomo: bump to 1.19.22 --- mihomo/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mihomo/Makefile b/mihomo/Makefile index cdb4994..4e49b54 100644 --- a/mihomo/Makefile +++ b/mihomo/Makefile @@ -5,13 +5,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mihomo -PKG_VERSION:=1.19.21 +PKG_VERSION:=1.19.22 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_VERSION:=v$(PKG_VERSION) PKG_SOURCE_URL:=https://github.com/MetaCubeX/mihomo -PKG_MIRROR_HASH:=1ee4e5f471d3f31043fde27441b47d39d3df0814a36ee18a05466b13348c0512 +PKG_MIRROR_HASH:=c6cd1de8891f690fa64ac73b162f36b74c06cc184495f18e8a2b3e9e6253b396 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE