mirror of
https://github.com/teddysun/across.git
synced 2025-10-08 13:55:34 +08:00
Added xray-core rpm and deb source
Signed-off-by: Teddysun <i@teddysun.com>
This commit is contained in:
19
deb/xray/common/config.json
Normal file
19
deb/xray/common/config.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"inbounds": [{
|
||||
"port": 9000,
|
||||
"protocol": "vmess",
|
||||
"settings": {
|
||||
"clients": [
|
||||
{
|
||||
"id": "1eb6e917-774b-4a84-aff6-b058577c60a5",
|
||||
"level": 1,
|
||||
"alterId": 64
|
||||
}
|
||||
]
|
||||
}
|
||||
}],
|
||||
"outbounds": [{
|
||||
"protocol": "freedom",
|
||||
"settings": {}
|
||||
}]
|
||||
}
|
29
deb/xray/common/control
Normal file
29
deb/xray/common/control
Normal file
@@ -0,0 +1,29 @@
|
||||
Source: xray
|
||||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: Teddysun <i@teddysun.com>
|
||||
Build-Depends: bash,
|
||||
cmake,
|
||||
dh-apparmor,
|
||||
debhelper-compat (= 12),
|
||||
gcc,
|
||||
git,
|
||||
libc-dev,
|
||||
libltdl-dev,
|
||||
libseccomp-dev,
|
||||
libseccomp2,
|
||||
libsystemd-dev,
|
||||
libtool,
|
||||
make,
|
||||
pkg-config
|
||||
Standards-Version: 3.9.6
|
||||
Homepage: https://github.com/xtls/xray-core
|
||||
Rules-Requires-Root: no
|
||||
Vcs-Browser: https://github.com/xtls/xray-core
|
||||
Vcs-Git: git://github.com/xtls/xray-core.git
|
||||
|
||||
Package: xray
|
||||
Architecture: linux-any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: Xray, Penetrates Everything.
|
||||
Also the best v2ray-core, with XTLS support. Fully compatible configuration.
|
32
deb/xray/common/rules
Normal file
32
deb/xray/common/rules
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
# force packages to be built with xz compression, as Ubuntu 21.10 and up use
|
||||
# zstd compression, which is non-standard, and breaks 'dpkg-sig --verify'
|
||||
override_dh_builddeb:
|
||||
dh_builddeb -- -Zxz
|
||||
|
||||
override_dh_auto_build:
|
||||
cd xray \
|
||||
&& GO111MODULE=on \
|
||||
env CGO_ENABLED=0 go build -v -trimpath -ldflags "-s -w -buildid=" -o "xray" ./main
|
||||
|
||||
# http://manpages.debian.org/dh_dwz
|
||||
override_dh_dwz:
|
||||
# dh_dwz in debhelper versions less than 13 has issues with files that are missing debug symbols (once we update to debhelper-compat 13+ this can be removed)
|
||||
@# https://packages.debian.org/debhelper
|
||||
@# https://packages.ubuntu.com/debhelper
|
||||
|
||||
override_dh_auto_install:
|
||||
install -D -m 0644 debian/config.json debian/xray/etc/xray/config.json
|
||||
install -D -m 0755 xray/xray debian/xray/usr/bin/xray
|
||||
install -D -m 0644 xray/geoip.dat debian/xray/usr/share/xray/geoip.dat
|
||||
install -D -m 0644 xray/geosite.dat debian/xray/usr/share/xray/geosite.dat
|
||||
|
||||
override_dh_installsystemd:
|
||||
dh_installsystemd --no-enable --no-start
|
||||
|
||||
override_dh_shlibdeps:
|
||||
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
|
||||
|
||||
%:
|
||||
dh $@
|
1
deb/xray/common/source/format
Normal file
1
deb/xray/common/source/format
Normal file
@@ -0,0 +1 @@
|
||||
1.0
|
1
deb/xray/common/xray.docs
Normal file
1
deb/xray/common/xray.docs
Normal file
@@ -0,0 +1 @@
|
||||
xray/README.md
|
2
deb/xray/common/xray.install
Normal file
2
deb/xray/common/xray.install
Normal file
@@ -0,0 +1,2 @@
|
||||
debian/xray.service lib/systemd/system/
|
||||
debian/xray@.service lib/systemd/system/
|
17
deb/xray/common/xray.service
Normal file
17
deb/xray/common/xray.service
Normal file
@@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=Xray Service
|
||||
Documentation=https://github.com/xtls
|
||||
After=network.target nss-lookup.target
|
||||
|
||||
[Service]
|
||||
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
|
||||
LimitNPROC=10000
|
||||
LimitNOFILE=1000000
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
17
deb/xray/common/xray@.service
Normal file
17
deb/xray/common/xray@.service
Normal file
@@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=Xray Service
|
||||
Documentation=https://github.com/xtls
|
||||
After=network.target nss-lookup.target
|
||||
|
||||
[Service]
|
||||
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
|
||||
LimitNPROC=10000
|
||||
LimitNOFILE=1000000
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Reference in New Issue
Block a user