summarylogtreecommitdiffstats
path: root/xray.service
diff options
context:
space:
mode:
authorAkinoKaede2020-12-19 19:48:32 +0800
committerAkinoKaede2020-12-19 19:48:32 +0800
commit0484329f1ac8e2b787e644f01ad8eb636a89787b (patch)
tree9251fe76fe062eb96af04987aea3d0a246bfb5f4 /xray.service
parentacf394a746ed245e49745230aa317589a0f61f60 (diff)
downloadaur-0484329f1ac8e2b787e644f01ad8eb636a89787b.tar.gz
v1.1.4
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..f4215d9be8ba
--- /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
+Environment=XRAY_LOCATION_ASSET=/usr/share/v2ray
+ExecStart=/usr/bin/xray run -config /etc/xray/config.json
+Restart=on-failure
+RestartPreventExitStatus=23
+
+[Install]
+WantedBy=multi-user.target