本站支持「有偿」远程协助!

国内腾讯云搭建 Xray 节点

国内 腾讯云 搭建节点.

Xray

#!/bin/sh

wget -O /usr/local/bin/xray https://cdn.jsdelivr.net/gh/none-blue/xray-amd64@main/xray
chmod +x /usr/local/bin/xray

cat <<EOF > /etc/systemd/system/xray.service
[Unit]
Description=The Xray Proxy Serve
After=network-online.target

[Service]
ExecStart=/usr/local/bin/xray -c /etc/xray/serve.toml
ExecStop=/bin/kill -s QUIT $MAINPID
Restart=always
RestartSec=15s

[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable xray

# Xray Configuration
mkdir -p /etc/xray
cat <<EOF > /etc/xray/serve.toml
[log]
loglevel = "none"

[[inbounds]]
protocol = "vless"
port = "2324"

[inbounds.settings]
decryption = "none"

[[inbounds.settings.clients]]
id = "b9ca9e73-ee13-5229-ad96-4045ea0342a7"

[inbounds.streamSettings]
network = "ws"

[[outbounds]]
protocol = "freedom"
EOF

systemctl start xray
#systemctl status xray

x-ui

#!/bin/sh

wget -O /usr/local/bin/xui https://cdn.jsdelivr.net/gh/mainians/xui@main/xui
wget -O /usr/local/bin/xray-linux-amd64 https://cdn.jsdelivr.net/gh/none-blue/xray-amd64@main/xray
wget -O /usr/local/bin/geosite.dat https://cdn.jsdelivr.net/gh/googleians/Rules@main/geosite.dat
wget -O /usr/local/bin/geoip.dat https://cdn.jsdelivr.net/gh/googleians/Rules@main/geoip.dat
chmod +x /usr/local/bin/{xui,xray-linux-amd64}

cat <<EOF > /etc/systemd/system/xui.service
[Unit]
Description=The Xui Proxy Serve
After=network-online.target

[Service]
WorkingDirectory=/usr/local/
ExecStart=/usr/local/bin/xui
ExecStop=/bin/kill -s QUIT $MAINPID
Restart=always
RestartSec=15s

[Install]
WantedBy=multi-user.target
EOF

systemctl daemon-reload
systemctl enable xui
systemctl stop xui
systemctl start xui
#systemctl status xui
Loading ...
无广告!