Skip to content

Commit

Permalink
Merge pull request #109 from morytyann/v1.7.1
Browse files Browse the repository at this point in the history
v1.7.1
  • Loading branch information
morytyann authored Aug 22, 2024
2 parents b576423 + 2094cd0 commit 9b3dfc3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion luci-app-mihomo/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include $(TOPDIR)/rules.mk

PKG_VERSION:=1.7.0
PKG_VERSION:=1.7.1

LUCI_TITLE:=LuCI Support for mihomo
LUCI_DEPENDS:=+luci-base +mihomo
Expand Down
2 changes: 1 addition & 1 deletion mihomo/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=mihomo
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/MetaCubeX/mihomo.git
Expand Down
5 changes: 5 additions & 0 deletions mihomo/files/capabilities.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,39 @@
"permitted": [
"CAP_FOWNER",
"CAP_DAC_OVERRIDE",
"CAP_SYS_PTRACE",
"CAP_NET_ADMIN",
"CAP_NET_BIND_SERVICE",
"CAP_NET_RAW"
],
"effective": [
"CAP_FOWNER",
"CAP_DAC_OVERRIDE",
"CAP_SYS_PTRACE",
"CAP_NET_ADMIN",
"CAP_NET_BIND_SERVICE",
"CAP_NET_RAW"
],
"bounding": [
"CAP_FOWNER",
"CAP_DAC_OVERRIDE",
"CAP_SYS_PTRACE",
"CAP_NET_ADMIN",
"CAP_NET_BIND_SERVICE",
"CAP_NET_RAW"
],
"inheritable": [
"CAP_FOWNER",
"CAP_DAC_OVERRIDE",
"CAP_SYS_PTRACE",
"CAP_NET_ADMIN",
"CAP_NET_BIND_SERVICE",
"CAP_NET_RAW"
],
"ambient": [
"CAP_FOWNER",
"CAP_DAC_OVERRIDE",
"CAP_SYS_PTRACE",
"CAP_NET_ADMIN",
"CAP_NET_BIND_SERVICE",
"CAP_NET_RAW"
Expand Down
8 changes: 3 additions & 5 deletions mihomo/files/mihomo.init
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,9 @@ start_service() {
procd_set_param user "$MIHOMO_USER"
procd_set_param group "$MIHOMO_GROUP"

procd_add_jail mihomo procfs
procd_add_jail_mount "$PROG"
procd_add_jail_mount /etc/TZ /etc/hosts /etc/ssl/certs
procd_add_jail_mount_rw "$RUN_DIR"
procd_add_jail_mount_rw /dev/net
procd_add_jail mihomo requirejail
procd_add_jail_mount "$PROG" /etc/TZ /etc/hosts /etc/ssl/certs /proc
procd_add_jail_mount_rw "$RUN_DIR" /dev/net
procd_set_param capabilities /etc/capabilities/mihomo.json
procd_set_param no_new_privs 1

Expand Down

0 comments on commit 9b3dfc3

Please sign in to comment.