更新系统并安装一些工具
1
|
sudo apt update && sudo apt install wget unzip
|
vim
安装并设置snell服务端
下载
1
|
wget https://dl.nssurge.com/snell/snell-server-v4.0.1-linux-amd64.zip
|
解压
1
|
sudo unzip snell-server-v4.0.1-linux-amd64.zip -d /usr/local/bin
|
赋予权限
1
|
chmod +x /usr/local/bin/snell-server
|
新建文件夹
编写配置文件
1
|
sudo vim /etc/snell/snell-server.conf
|
复制粘贴进去,按esc后输入”:wq”保存推出,如需修改按”i”后移动光标修改
1
2
3
4
|
[snell-server]
listen = 0.0.0.0:5492
psk = l8h65tjDH
ipv6 = false
|
如果服务器只有纯ipv6地址,或者有ipv6使用需求,就把listen
参数修改为::0:5492
然后把ipv6
参数修改为 true
配置 Systemd 服务文件
1
|
sudo vim /lib/systemd/system/snell.service
|
将下面的复制粘贴进去,按esc 后输入“:wq”保存退出
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
[Unit]
Description=Snell Proxy Service
After=network.target
[Service]
Type=simple
User=nobody
Group=nogroup
LimitNOFILE=32768
ExecStart=/usr/local/bin/snell-server -c /etc/snell/snell-server.conf
AmbientCapabilities=CAP_NET_BIND_SERVICE
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=snell-server
[Install]
WantedBy=multi-user.target
|
重载服务
1
|
sudo systemctl daemon-reload
|
开机运行 Snell
1
|
sudo systemctl enable snell
|
开启
1
|
sudo systemctl start snell
|
停止
1
|
sudo systemctl stop snell
|
查看状态
1
|
sudo systemctl status snell
|