summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkinoKaede2020-12-19 19:48:32 +0800
committerAkinoKaede2020-12-19 19:48:32 +0800
commit0484329f1ac8e2b787e644f01ad8eb636a89787b (patch)
tree9251fe76fe062eb96af04987aea3d0a246bfb5f4
parentacf394a746ed245e49745230aa317589a0f61f60 (diff)
downloadaur-0484329f1ac8e2b787e644f01ad8eb636a89787b.tar.gz
v1.1.4
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD19
-rw-r--r--xray.service17
-rw-r--r--xray@.service18
4 files changed, 50 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d5e7dd5be5aa..a77cc8ce8ae1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = xray-bin
pkgdesc = The best v2ray-core, with XTLS support.
- pkgver = 1.1.3
+ pkgver = 1.1.4
pkgrel = 1
url = https://github.com/XTLS/Xray-core
arch = x86_64
@@ -11,14 +11,18 @@ pkgbase = xray-bin
provides = xray
conflicts = xray
backup = etc/xray/config.json
- source = xray-bin-1.1.3.tar.gz::https://github.com/XTLS/Xray-core/releases/download/v1.1.3/Xray-linux-64.zip
+ source = xray-bin-1.1.4.tar.gz::https://github.com/XTLS/Xray-core/releases/download/v1.1.4/Xray-linux-64.zip
source = config.json
source = vpoint_socks_vmess.json
source = vpoint_vmess_freedom.json
- sha512sums = 9b5eef29f86a3c1699407df39e6c8326c9ac5cf0216ce306beccdae01780125d362bc90d9e5b1321d95c4394a0b1928072203adc1f0b406fd7428007e4683933
+ source = xray.service
+ source = xray@.service
+ sha512sums = 90ce62216195b3d2e7ca9f0fe1f1562cec06d14c76af550821e6327f19b5e4d1b329660f15bcdc244713822960a743e92c21a6354f70056ff037adabb8d6bb0b
sha512sums = 2000211cbf987adaee7f278cc8cb23268965caab3bc46401f9324f2beaad95bec11012f5f4500f1016f4b75f097f3ac96cc5be2da7a6df0261582b3f23b3d78d
sha512sums = 9914fd3da02511b716951e521ca22006a6e8ad66e64d32cc7dd7dc3544a754174b37e35df6108ca217130f02763265d74f8bc56c4e52b262bdd48dcdb5310eb5
sha512sums = 532f66fe19196de0cc43df1812d6f32cbca7bbcacaa0cd4141bd80b3121b17eb8b23e0464765cf05a97b11e0213fb688eade83e393e36b3e7ebded6f0925de97
+ sha512sums = f5ea93fab3a108ee30bbf9ac6f611df0397809f0c63c6bdb79dde60a49c3be175b4c915bd4d26313fbd2703b73f3a28f3e158352c521d1173baac219df73300d
+ sha512sums = 7c96cbea8d8e34d2458c3aeb31b03e9f322e3774193e0458f003f2336c7ff39b65a94840942f09b7c5e96287c74cdd8b7b96717e38ff230161ad887d34a86d8f
pkgname = xray-bin
diff --git a/PKGBUILD b/PKGBUILD
index ff0e7181d4f6..7ac96e075b1c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
# Contributor: pandada8 <pandada8@gmail.com>
pkgname=xray-bin
-pkgver=1.1.3
+pkgver=1.1.4
pkgrel=1
pkgdesc="The best v2ray-core, with XTLS support."
arch=('x86_64')
@@ -18,26 +18,23 @@ source=(
"config.json"
"vpoint_socks_vmess.json"
"vpoint_vmess_freedom.json"
+ "xray.service"
+ "xray@.service"
)
sha512sums=(
- '9b5eef29f86a3c1699407df39e6c8326c9ac5cf0216ce306beccdae01780125d362bc90d9e5b1321d95c4394a0b1928072203adc1f0b406fd7428007e4683933'
+ '90ce62216195b3d2e7ca9f0fe1f1562cec06d14c76af550821e6327f19b5e4d1b329660f15bcdc244713822960a743e92c21a6354f70056ff037adabb8d6bb0b'
'2000211cbf987adaee7f278cc8cb23268965caab3bc46401f9324f2beaad95bec11012f5f4500f1016f4b75f097f3ac96cc5be2da7a6df0261582b3f23b3d78d'
'9914fd3da02511b716951e521ca22006a6e8ad66e64d32cc7dd7dc3544a754174b37e35df6108ca217130f02763265d74f8bc56c4e52b262bdd48dcdb5310eb5'
'532f66fe19196de0cc43df1812d6f32cbca7bbcacaa0cd4141bd80b3121b17eb8b23e0464765cf05a97b11e0213fb688eade83e393e36b3e7ebded6f0925de97'
+ 'f5ea93fab3a108ee30bbf9ac6f611df0397809f0c63c6bdb79dde60a49c3be175b4c915bd4d26313fbd2703b73f3a28f3e158352c521d1173baac219df73300d'
+ '7c96cbea8d8e34d2458c3aeb31b03e9f322e3774193e0458f003f2336c7ff39b65a94840942f09b7c5e96287c74cdd8b7b96717e38ff230161ad887d34a86d8f'
)
-prepare() {
- cd "${srcdir}"
- sed -i 's|/usr/local/bin|/usr/bin|;s|/usr/local/etc|/etc|' systemd/system/*.service
- sed -i '/ExecStart/i\Environment=XRAY_LOCATION_ASSET=/usr/share/v2ray' systemd/system/*.service
-}
-
-
package() {
cd "${srcdir}"
install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/xray/LICENSE
- install -Dm644 systemd/system/xray.service "${pkgdir}"/usr/lib/systemd/system/xray.service
- install -Dm644 systemd/system/xray@.service "${pkgdir}"/usr/lib/systemd/system/xray@.service
+ install -Dm644 xray.service "${pkgdir}"/usr/lib/systemd/system/xray.service
+ install -Dm644 xray@.service "${pkgdir}"/usr/lib/systemd/system/xray@.service
install -Dm644 *.json -t "${pkgdir}"/etc/xray/
install -Dm755 xray -t "${pkgdir}"/usr/bin/
}
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
diff --git a/xray@.service b/xray@.service
new file mode 100644
index 000000000000..bbb0461171ae
--- /dev/null
+++ b/xray@.service
@@ -0,0 +1,18 @@
+[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/%i.json
+Restart=on-failure
+RestartPreventExitStatus=23
+
+[Install]
+WantedBy=multi-user.target
+