[Unit] Description=mihomo Daemon, Another Clash Kernel. Documentation=https://wiki.metacubex.one/ After=network.target NetworkManager.service systemd-networkd.service iwd.service Wants=network-online.target [Service] 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 RestartSec=5 StartLimitBurst=5 StartLimitIntervalSec=300 ExecStartPre=/usr/bin/sleep 1s ExecStart=/usr/local/bin/mihomo -d /etc/mihomo ExecReload=/bin/kill -HUP $MAINPID # 安全加固 NoNewPrivileges=true ProtectSystem=strict ReadWritePaths=/etc/mihomo PrivateTmp=true ProtectHome=true [Install] WantedBy=multi-user.target