diff options
author | AkinoKaede | 2021-05-04 13:38:31 +0800 |
---|---|---|
committer | AkinoKaede | 2021-05-04 13:38:31 +0800 |
commit | dc4397ee53188d13a5147a3ab868e6b9b5bd86d7 (patch) | |
tree | ed88e45c10c78d5171a6d47d1cb547e9ba06d9a5 | |
parent | 838fba3c1994f1f962d0e70438f57b1ee0525613 (diff) | |
download | aur-dc4397ee53188d13a5147a3ab868e6b9b5bd86d7.tar.gz |
upgpkg: xray-git 1.4.2.r4.1e3d739-1
-rw-r--r-- | .SRCINFO | 25 | ||||
-rw-r--r-- | PKGBUILD | 43 | ||||
-rw-r--r-- | config.json | 143 | ||||
-rw-r--r-- | location_asset.patch | 9 | ||||
-rw-r--r-- | vpoint_socks_vmess.json | 25 | ||||
-rw-r--r-- | vpoint_vmess_freedom.json | 32 | ||||
-rw-r--r-- | xray.service | 8 | ||||
-rw-r--r-- | xray.sysusers | 1 | ||||
-rw-r--r-- | xray.tmpfiles | 1 | ||||
-rw-r--r-- | xray@.service | 7 |
10 files changed, 34 insertions, 260 deletions
@@ -1,33 +1,28 @@ pkgbase = xray-git pkgdesc = The best v2ray-core, with XTLS support. - pkgver = 1.3.0 + pkgver = 1.4.2.r4.1e3d739 pkgrel = 1 url = https://github.com/XTLS/Xray-core arch = x86_64 license = MPL2 makedepends = go makedepends = git - makedepends = patch depends = glibc - depends = v2ray-domain-list-community - depends = v2ray-geoip + depends = xray-domain-list-community + depends = xray-geoip provides = xray conflicts = xray backup = etc/xray/config.json source = Xray-core::git+https://github.com/XTLS/Xray-core.git - source = config.json - source = vpoint_socks_vmess.json - source = vpoint_vmess_freedom.json + source = xray.sysusers + source = xray.tmpfiles source = xray.service source = xray@.service - source = location_asset.patch - sha512sums = SKIP - sha512sums = 2000211cbf987adaee7f278cc8cb23268965caab3bc46401f9324f2beaad95bec11012f5f4500f1016f4b75f097f3ac96cc5be2da7a6df0261582b3f23b3d78d - sha512sums = 9914fd3da02511b716951e521ca22006a6e8ad66e64d32cc7dd7dc3544a754174b37e35df6108ca217130f02763265d74f8bc56c4e52b262bdd48dcdb5310eb5 - sha512sums = 532f66fe19196de0cc43df1812d6f32cbca7bbcacaa0cd4141bd80b3121b17eb8b23e0464765cf05a97b11e0213fb688eade83e393e36b3e7ebded6f0925de97 - sha512sums = 1d31e11c3a11090ee2616adfcf77a4a1013793c8f63a41e5293d07e889e34f85223b9f5a0791b649f22ecc5e18e12182b5b074e61aa36f5cd6de523f3c64f95d - sha512sums = 6582aa9bf988acb2660a7172282768c217ad8335a55ccee916d7786c227bc62cc973d7d6d3b5632260c69eec98c15804c2b52cdd91c5f395d3a0fe36519586b4 - sha512sums = 3fc64f9980fb9d5ceedf6c77fa88abcbf9c3ca15189de7f4e5e319d525591d7049676b8a89e9ef1341ed3ba198041539db4fe37338bab4df9f9b7594f77b36b6 + sha256sums = SKIP + sha256sums = 801131bf2eb079750f17d3e703e414eab8494db0d512164cdef3cc68cef308b8 + sha256sums = 2d301e9f2fae728da55f33a15b2c36e90cdb657deafb5d6ab7d74375ce9fdf38 + sha256sums = 66a8a3280aa5b3ed41b9855ba3de3f884bd2113b4a965cf097fcb31c3a6066ed + sha256sums = 05d16acd6e00989ece245bf0df919accae858555c7165a50ce2b3db9c0c5a725 pkgname = xray-git @@ -1,36 +1,33 @@ # Maintainer: AkinoKaede <autmaple@protonmail.com> # Contributor: Felix Yan <felixonmars@archlinux.org> # Contributor: pandada8 <pandada8@gmail.com> +# Contributor: Dct Mei <dctxmei@yandex.com> pkgname=xray-git -pkgver=1.3.0 +pkgver=1.4.2.r4.1e3d739 pkgrel=1 pkgdesc="The best v2ray-core, with XTLS support." arch=('x86_64') url="https://github.com/XTLS/Xray-core" license=('MPL2') -depends=('glibc' 'v2ray-domain-list-community' 'v2ray-geoip') -makedepends=('go' 'git' 'patch') +depends=('glibc' 'xray-domain-list-community' 'xray-geoip') +makedepends=('go' 'git') backup=(etc/xray/config.json) provides=("${pkgname%-git}") conflicts=("${pkgname%-git}") source=( "Xray-core::git+${url}.git" - "config.json" - "vpoint_socks_vmess.json" - "vpoint_vmess_freedom.json" + "xray.sysusers" + "xray.tmpfiles" "xray.service" "xray@.service" - "location_asset.patch" ) -sha512sums=( +sha256sums=( 'SKIP' - '2000211cbf987adaee7f278cc8cb23268965caab3bc46401f9324f2beaad95bec11012f5f4500f1016f4b75f097f3ac96cc5be2da7a6df0261582b3f23b3d78d' - '9914fd3da02511b716951e521ca22006a6e8ad66e64d32cc7dd7dc3544a754174b37e35df6108ca217130f02763265d74f8bc56c4e52b262bdd48dcdb5310eb5' - '532f66fe19196de0cc43df1812d6f32cbca7bbcacaa0cd4141bd80b3121b17eb8b23e0464765cf05a97b11e0213fb688eade83e393e36b3e7ebded6f0925de97' - '1d31e11c3a11090ee2616adfcf77a4a1013793c8f63a41e5293d07e889e34f85223b9f5a0791b649f22ecc5e18e12182b5b074e61aa36f5cd6de523f3c64f95d' - '6582aa9bf988acb2660a7172282768c217ad8335a55ccee916d7786c227bc62cc973d7d6d3b5632260c69eec98c15804c2b52cdd91c5f395d3a0fe36519586b4' - '3fc64f9980fb9d5ceedf6c77fa88abcbf9c3ca15189de7f4e5e319d525591d7049676b8a89e9ef1341ed3ba198041539db4fe37338bab4df9f9b7594f77b36b6' + '801131bf2eb079750f17d3e703e414eab8494db0d512164cdef3cc68cef308b8' + '2d301e9f2fae728da55f33a15b2c36e90cdb657deafb5d6ab7d74375ce9fdf38' + '66a8a3280aa5b3ed41b9855ba3de3f884bd2113b4a965cf097fcb31c3a6066ed' + '05d16acd6e00989ece245bf0df919accae858555c7165a50ce2b3db9c0c5a725' ) pkgver() { @@ -38,10 +35,6 @@ pkgver() { printf "%s" "$(git describe --tags | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g')" } -prepare() { - patch "${srcdir}"/Xray-core/common/platform/others.go "${srcdir}"/location_asset.patch -} - build() { cd "${srcdir}"/Xray-core export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external" @@ -57,12 +50,10 @@ check() { } package() { - cd "${srcdir}" - 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/ - - cd "${srcdir}"/Xray-core - install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/xray/LICENSE - install -Dm755 xray -t "${pkgdir}"/usr/bin/ + install -Dm755 "${srcdir}"/Xray-core/xray -t "${pkgdir}"/usr/bin/ + install -Dm644 "${srcdir}"/Xray-core/LICENSE -t "${pkgdir}"/usr/share/licenses/xray/ + install -Dm644 "${srcdir}"/xray.sysusers "${pkgdir}"/usr/lib/sysusers.d/xray.conf + install -Dm644 "${srcdir}"/xray.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/xray.conf + install -Dm644 "${srcdir}"/xray.service -t "${pkgdir}"/usr/lib/systemd/system/ + install -Dm644 "${srcdir}"/xray@.service -t "${pkgdir}"/usr/lib/systemd/system/ } diff --git a/config.json b/config.json deleted file mode 100644 index 4506bac71993..000000000000 --- a/config.json +++ /dev/null @@ -1,143 +0,0 @@ -// Config file of Xray. This file follows standard JSON format, with comments support. -// Uncomment entries below to satisfy your needs. Also read our manual for more detail at -{ - "log": { - // By default, Xray writes access log to stdout. - // "access": "/path/to/access/log/file", - - // By default, Xray write error log to stdout. - // "error": "/path/to/error/log/file", - - // Log level, one of "debug", "info", "warning", "error", "none" - "loglevel": "warning" - }, - // List of inbound proxy configurations. - "inbounds": [{ - // Port to listen on. You may need root access if the value is less than 1024. - "port": 1080, - - // IP address to listen on. Change to "0.0.0.0" to listen on all network interfaces. - "listen": "127.0.0.1", - - // Tag of the inbound proxy. May be used for routing. - "tag": "socks-inbound", - - // Protocol name of inbound proxy. - "protocol": "socks", - - // Settings of the protocol. Varies based on protocol. - "settings": { - "auth": "noauth", - "udp": false, - "ip": "127.0.0.1" - }, - - // Enable sniffing on TCP connection. - "sniffing": { - "enabled": true, - // Target domain will be overriden to the one carried by the connection, if the connection is HTTP or HTTPS. - "destOverride": ["http", "tls"] - } - }], - // List of outbound proxy configurations. - "outbounds": [{ - // Protocol name of the outbound proxy. - "protocol": "freedom", - - // Settings of the protocol. Varies based on protocol. - "settings": {}, - - // Tag of the outbound. May be used for routing. - "tag": "direct" - },{ - "protocol": "blackhole", - "settings": {}, - "tag": "blocked" - }], - - // Transport is for global transport settings. If you have multiple transports with same settings - // (say mKCP), you may put it here, instead of in each individual inbound/outbounds. - //"transport": {}, - - // Routing controls how traffic from inbounds are sent to outbounds. - "routing": { - "domainStrategy": "IPOnDemand", - "rules":[ - { - // Blocks access to private IPs. Remove this if you want to access your router. - "type": "field", - "ip": ["geoip:private"], - "outboundTag": "blocked" - }, - { - // Blocks major ads. - "type": "field", - "domain": ["geosite:category-ads"], - "outboundTag": "blocked" - } - ] - }, - - // Dns settings for domain resolution. - "dns": { - // Static hosts, similar to hosts file. - "hosts": { - // Match v2ray.com to another domain on CloudFlare. This domain will be used when querying IPs for v2ray.com. - "domain:v2ray.com": "www.vicemc.net", - - // The following settings help to eliminate DNS poisoning in mainland China. - // It is safe to comment these out if this is not the case for you. - "domain:github.io": "pages.github.com", - "domain:wikipedia.org": "www.wikimedia.org", - "domain:shadowsocks.org": "electronicsrealm.com" - }, - "servers": [ - "1.1.1.1", - { - "address": "114.114.114.114", - "port": 53, - // List of domains that use this DNS first. - "domains": [ - "geosite:cn" - ] - }, - "8.8.8.8", - "localhost" - ] - }, - - // Policy controls some internal behavior of how Xray handles connections. - // It may be on connection level by user levels in 'levels', or global settings in 'system.' - "policy": { - // Connection policys by user levels - "levels": { - "0": { - "uplinkOnly": 0, - "downlinkOnly": 0 - } - }, - "system": { - "statsInboundUplink": false, - "statsInboundDownlink": false, - "statsOutboundUplink": false, - "statsOutboundDownlink": false - } - }, - - // Stats enables internal stats counter. - // This setting can be used together with Policy and Api. - //"stats":{}, - - // Api enables gRPC APIs for external programs to communicate with Xray instance. - //"api": { - //"tag": "api", - //"services": [ - // "HandlerService", - // "LoggerService", - // "StatsService" - //] - //}, - - // You may add other entries to the configuration, but they will not be recognized by Xray. - "other": {} -} diff --git a/location_asset.patch b/location_asset.patch deleted file mode 100644 index 7bf4aaff8679..000000000000 --- a/location_asset.patch +++ /dev/null @@ -1,9 +0,0 @@ -@@ -30,6 +30,8 @@ - defPath, - filepath.Join("/usr/local/share/xray/", file), - filepath.Join("/usr/share/xray/", file), -+ filepath.Join("/usr/local/share/v2ray/", file), -+ filepath.Join("/usr/share/v2ray/", file), - } { - if _, err := os.Stat(p); os.IsNotExist(err) { - continue diff --git a/vpoint_socks_vmess.json b/vpoint_socks_vmess.json deleted file mode 100644 index 789cd270af2a..000000000000 --- a/vpoint_socks_vmess.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "log": { - "loglevel": "warning" - }, - "inbounds": [{ - "port": 1080, - "listen": "127.0.0.1", - "protocol": "socks", - "settings": { - "auth": "noauth", - "udp": false, - "ip": "127.0.0.1" - } - }], - "outbounds": [{ - "protocol": "freedom", - "settings": {}, - "tag": "direct" - }], - "policy": { - "levels": { - "0": {"uplinkOnly": 0} - } - } -} diff --git a/vpoint_vmess_freedom.json b/vpoint_vmess_freedom.json deleted file mode 100644 index de51e9f240fc..000000000000 --- a/vpoint_vmess_freedom.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "inbounds": [{ - "port": 10086, - "protocol": "vmess", - "settings": { - "clients": [ - { - "id": "23ad6b10-8d1a-40f7-8ad0-e3e35cd38297", - "level": 1, - "alterId": 64 - } - ] - } - }], - "outbounds": [{ - "protocol": "freedom", - "settings": {} - },{ - "protocol": "blackhole", - "settings": {}, - "tag": "blocked" - }], - "routing": { - "rules": [ - { - "type": "field", - "ip": ["geoip:private"], - "outboundTag": "blocked" - } - ] - } -} diff --git a/xray.service b/xray.service index 77889293c647..2c24daa71b2a 100644 --- a/xray.service +++ b/xray.service @@ -1,16 +1,14 @@ [Unit] Description=Xray Service -Documentation=https://github.com/xtls After=network.target nss-lookup.target [Service] -User=nobody +User=xray 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/config.json -Restart=on-failure -RestartPreventExitStatus=23 +ExecStart=/usr/bin/xray run -confdir /etc/xray/ +Restart=on-abort [Install] WantedBy=multi-user.target diff --git a/xray.sysusers b/xray.sysusers new file mode 100644 index 000000000000..0260d2dc7bb2 --- /dev/null +++ b/xray.sysusers @@ -0,0 +1 @@ +u xray - "Xray Service" - - diff --git a/xray.tmpfiles b/xray.tmpfiles new file mode 100644 index 000000000000..896975f1587a --- /dev/null +++ b/xray.tmpfiles @@ -0,0 +1 @@ +d /var/log/xray 0700 xray xray - - diff --git a/xray@.service b/xray@.service index c7563486d112..a024fb1a9fca 100644 --- a/xray@.service +++ b/xray@.service @@ -1,17 +1,14 @@ [Unit] Description=Xray Service -Documentation=https://github.com/xtls After=network.target nss-lookup.target [Service] -User=nobody +User=xray 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 +Restart=on-abort [Install] WantedBy=multi-user.target - |