Another Looking-glass

吊鸡的遗产https://github.com/wikihost-opensource/als

防止删库找不到, 存一份本地文件。

mkdir /etc/als/
curl nxtrace.org/nt | bash
wget  https://github.com/samlm0/als/releases/download/111/als-linux-amd64 -O /etc/als/als
chmod 755 /etc/als/als
cat>/etc/als/als.conf<<EOF
#LISTEN_IP = 127.0.0.1
HTTP_PORT=8080
SPEEDTEST_FILE_LIST="100MB 500M 1GB" 
LOCATION="Tokyo, Japan"
ENABLE_SPEEDTEST=false

#PUBLIC_IPV4=
#PUBLIC_IPV6=
UTILITIES_PING=true
UTILITIES_IPERF3=true
UTILITIES_IPERF3_PORT_MIN=30000
UTILITIES_IPERF3_PORT_MAX=31000
UTILITIES_FAKESHELL=true
#SPONSOR_MESSAGE="Test message" 
EOF

cat>/etc/systemd/system/als.service<<EOF
[Unit]
Description=Another Looking-glass Server (ALS)
After=network.target

[Service]
Type=simple
WorkingDirectory=/etc/als
ExecStart=/etc/als/als
EnvironmentFile=/etc/als/als.conf
Restart=on-failure
User=nobody
Group=nobody

[Install]
WantedBy=multi-user.target
EOF

systemctl daemon-reload
systemctl enable als --now

添加新评论 »