Updated services

This commit is contained in:
2025-07-19 20:59:51 +03:00
parent 5374bf9cc1
commit ddc354a919
2 changed files with 30 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
[Unit]
Description=Mihomo iptables rules fixer
After=network.target
Before=mihomo.service
[Service]
Type=oneshot
ExecStart=/usr/local/bin/iptables-clash-setup.sh
RemainAfterExit=true
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,18 @@
[Unit]
Description=Mihomo Daemon, Another Clash Kernel.
After=network.target NetworkManager.service systemd-networkd.service iwd.service
[Service]
User=clash
Type=simple
LimitNPROC=500
LimitNOFILE=1000000
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SYS_TIME CAP_SYS_PTRACE CAP_DAC_READ_SEARCH CAP_DAC_OVERRIDE
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SYS_TIME CAP_SYS_PTRACE CAP_DAC_READ_SEARCH CAP_DAC_OVERRIDE
Restart=always
ExecStartPre=/usr/bin/sleep 1s
ExecStart=/usr/local/bin/mihomo -d /etc/clash
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target