summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkinoKaede2020-11-26 23:47:10 +0800
committerAkinoKaede2020-11-26 23:47:10 +0800
commit75ddbbd3c42cbd6b1c5bd0d7d85495d0dafc4e3e (patch)
treeb00736343e28506caee005400aed9af6a4fe1782
downloadaur-75ddbbd3c42cbd6b1c5bd0d7d85495d0dafc4e3e.tar.gz
xray-bin 1.0.0
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD44
-rw-r--r--config.json143
-rw-r--r--vpoint_socks_vmess.json25
-rw-r--r--vpoint_vmess_freedom.json32
5 files changed, 268 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..1490cdcb2ace
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = xray-bin
+ pkgdesc = Xray, Penetrates Everything. Also the best v2ray-core, with XTLS support. Fully compatible configuration.
+ pkgver = 1.0.0
+ pkgrel = 1
+ url = https://github.com/XTLS/Xray-core
+ arch = x86_64
+ license = MPLv2
+ depends = glibc
+ depends = v2ray-domain-list-community
+ depends = v2ray-geoip
+ backup = etc/xray/config.json
+ source = xray-bin-1.0.0.tar.gz::https://github.com/XTLS/Xray-core/releases/download/v1.0.0/Xray-linux-64.zip
+ source = LICENSE::https://raw.githubusercontent.com/XTLS/Xray-core/main/LICENSE
+ source = config.json
+ source = vpoint_socks_vmess.json
+ source = vpoint_vmess_freedom.json
+ sha512sums = 783a98d6259f5c1bbc39ec3e3fd8b03e860ff6cc2e9ccb7300bcd9c7d6ed9cb9757fdeb575dcc6e32d572eb1efa308b5cea46a7d894f72bf864ebc05a9ecb7d9
+ sha512sums = c1e3a0c8f5267fb5c0b65733bda037c62d914ed989bee0f510d8196b1029eec00d40f415ce1514a4996d420ba02d856d04db0915b64573ef4a36033cc5efb94e
+ sha512sums = 2000211cbf987adaee7f278cc8cb23268965caab3bc46401f9324f2beaad95bec11012f5f4500f1016f4b75f097f3ac96cc5be2da7a6df0261582b3f23b3d78d
+ sha512sums = 9914fd3da02511b716951e521ca22006a6e8ad66e64d32cc7dd7dc3544a754174b37e35df6108ca217130f02763265d74f8bc56c4e52b262bdd48dcdb5310eb5
+ sha512sums = 532f66fe19196de0cc43df1812d6f32cbca7bbcacaa0cd4141bd80b3121b17eb8b23e0464765cf05a97b11e0213fb688eade83e393e36b3e7ebded6f0925de97
+
+pkgname = xray-bin
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..8ace51cb04ea
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: AkinoKaede <autmaple@protonmail.com>
+# Special thanks: Felix Yan <felixonmars@archlinux.org>
+# Contributor: pandada8 <pandada8@gmail.com>
+
+pkgname=xray-bin
+pkgver=1.0.0
+pkgrel=1
+pkgdesc="Xray, Penetrates Everything. Also the best v2ray-core, with XTLS support. Fully compatible configuration. "
+arch=('x86_64')
+url="https://github.com/XTLS/Xray-core"
+license=('MPLv2')
+depends=('glibc' 'v2ray-domain-list-community' 'v2ray-geoip')
+backup=(etc/xray/config.json)
+source=(
+ "$pkgname-$pkgver.tar.gz::https://github.com/XTLS/Xray-core/releases/download/v$pkgver/Xray-linux-64.zip"
+ "LICENSE::https://raw.githubusercontent.com/XTLS/Xray-core/main/LICENSE"
+ "config.json"
+ "vpoint_socks_vmess.json"
+ "vpoint_vmess_freedom.json"
+)
+sha512sums=(
+ '783a98d6259f5c1bbc39ec3e3fd8b03e860ff6cc2e9ccb7300bcd9c7d6ed9cb9757fdeb575dcc6e32d572eb1efa308b5cea46a7d894f72bf864ebc05a9ecb7d9'
+ 'c1e3a0c8f5267fb5c0b65733bda037c62d914ed989bee0f510d8196b1029eec00d40f415ce1514a4996d420ba02d856d04db0915b64573ef4a36033cc5efb94e'
+ '2000211cbf987adaee7f278cc8cb23268965caab3bc46401f9324f2beaad95bec11012f5f4500f1016f4b75f097f3ac96cc5be2da7a6df0261582b3f23b3d78d'
+ '9914fd3da02511b716951e521ca22006a6e8ad66e64d32cc7dd7dc3544a754174b37e35df6108ca217130f02763265d74f8bc56c4e52b262bdd48dcdb5310eb5'
+ '532f66fe19196de0cc43df1812d6f32cbca7bbcacaa0cd4141bd80b3121b17eb8b23e0464765cf05a97b11e0213fb688eade83e393e36b3e7ebded6f0925de97'
+)
+
+prepare() {
+ cd $srcdir
+ sed -i 's|/usr/local/bin|/usr/bin|;s|/usr/local/etc|/etc|' systemd/system/*.service
+}
+
+
+package() {
+ cd $startdir
+ install -Dm644 *.json -t "$pkgdir"/etc/xray/
+
+ 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 -Dm755 xray -t "$pkgdir"/usr/bin/
+}
diff --git a/config.json b/config.json
new file mode 100644
index 000000000000..4506bac71993
--- /dev/null
+++ b/config.json
@@ -0,0 +1,143 @@
+// 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/vpoint_socks_vmess.json b/vpoint_socks_vmess.json
new file mode 100644
index 000000000000..789cd270af2a
--- /dev/null
+++ b/vpoint_socks_vmess.json
@@ -0,0 +1,25 @@
+{
+ "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
new file mode 100644
index 000000000000..de51e9f240fc
--- /dev/null
+++ b/vpoint_vmess_freedom.json
@@ -0,0 +1,32 @@
+{
+ "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"
+ }
+ ]
+ }
+}