Skip to main content

sing-box shadowsocks

sing-box 搭建 shadowsocks

wget -q4O /usr/local/bin/ycycxz-sing-box https://ycycxz.com/dl/ycycxz-sing-box-linux-amd64
chmod +x /usr/local/bin/ycycxz-sing-box
mkdir -p /etc/ycycxz-sing-box
ycycxz-sing-box version

cat <<EOF > /etc/ycycxz-sing-box/ycycxz.json
{
"inbounds": [
{
"type": "shadowsocks",
"listen": "0.0.0.0",
"listen_port": 42324,
"method": "aes-256-gcm",
"password": "ycycxz"
}
]
}
EOF

cat <<EOF > /etc/systemd/system/ycycxz-sing-box.service
[Unit]
Description=ycycxz-sing-box
After=network-online.target

[Service]
LimitAS=infinity
LimitNOFILE=infinity
LimitNPROC=infinity
TasksMax=infinity
ExecStart=/usr/local/bin/ycycxz-sing-box run -c /etc/ycycxz-sing-box/ycycxz.json
Restart=always
RestartSec=15s

[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable ycycxz-sing-box

systemctl start ycycxz-sing-box
#systemctl status ycycxz-sing-box