#!/bin/bash
echo "端口为 $1";
echo "密码为 $2";
echo "5s后开始安装";

sleep 5s
echo "[Unit]
Description=ss
After=network.target

[Service]
Type=simple
User=root
Restart=always
RestartSec=5s
ExecStart=/usr/local/bin/ssserver -s 0.0.0.0:$1 -m chacha20-ietf-poly1305 -k $2 -U
LimitNOFILE=1048576

[Install]
WantedBy=multi-user.target" > /etc/systemd/system/ss-"$1".service


wget --no-check-certificate https://file.hassy.co/ss/ssserver
mv ssserver /usr/local/bin/ssserver
chmod +x /usr/local/bin/ssserver

systemctl enable --now ss-"$1"



