summarylogtreecommitdiffstats
path: root/xray@.service
diff options
context:
space:
mode:
authorAkinoKaede2020-11-27 13:38:06 +0800
committerAkinoKaede2020-11-27 13:38:06 +0800
commit3c2b34901f1ac00447362dadbcf18aa0029ba07b (patch)
treee4f203edb7f9527e77bbd8f50d8fb861a2c0cd91 /xray@.service
downloadaur-3c2b34901f1ac00447362dadbcf18aa0029ba07b.tar.gz
xray-git 1.0.0.r3.f52381e
Diffstat (limited to 'xray@.service')
-rw-r--r--xray@.service17
1 files changed, 17 insertions, 0 deletions
diff --git a/xray@.service b/xray@.service
new file mode 100644
index 000000000000..c7563486d112
--- /dev/null
+++ b/xray@.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=Xray Service
+Documentation=https://github.com/xtls
+After=network.target nss-lookup.target
+
+[Service]
+User=nobody
+CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
+AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
+NoNewPrivileges=true
+ExecStart=/usr/bin/xray run -config /etc/xray/%i.json
+Restart=on-failure
+RestartPreventExitStatus=23
+
+[Install]
+WantedBy=multi-user.target
+