本文距离上次更新已过去 0 天,部分内容可能已经过时,请注意甄别。
一些常用的 Shell 脚本。
docker 搭建 socks5
1 2 3 4
| docker run -d --name socks5 -p 10808:1080 -e PROXY_USER=用户名 -e PROXY_PASSWORD=密码 --restart=always serjs/go-socks5-proxy
docker run -d --name socks5 -p 10808:1080 --restart=always serjs/go-socks5-proxy
|
1 2 3
| 10808:1080 PROXY_USER PROXY_PASSWORD
|
自定义测速脚本
用于对国外 vps 配置以及网络测试
1
| bash <(curl -Lso- https://git.io/superbench)
|
一键 DD 网络重装脚本
1 2 3 4 5 6 7
| wget --no-check-certificate -O AutoReinstall.sh https://git.io/AutoReinstall.sh && bash AutoReinstall.sh
CentOS:Pwd@CentOS
其他 Linux 系统:Pwd@Linux
系统DD包下载:https://dd.1234234.xyz/
|
Debian/Ubuntu 开启 BBR
1 2 3 4 5 6 7 8 9 10 11 12
| echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
sysctl -p
lsmod | grep bbr
tcp_bbr 20480 2
|
bbr/bbrplus/锐速内核安装脚本
1 2 3 4 5 6 7 8 9
| wget -N --no-check-certificate "https://github.000060000.xyz/tcp.sh" && chmod +x tcp.sh && ./tcp.sh
wget -O tcp.sh "https://git.io/coolspeeda" && chmod +x tcp.sh && ./tcp.sh
wget -N --no-check-certificate "https://github.000060000.xyz/tcpx.sh" && chmod +x tcpx.sh && ./tcpx.sh
wget -O tcpx.sh "https://git.io/JYxKU" && chmod +x tcpx.sh && ./tcpx.sh
|
服务器状态监控
1 2 3 4 5 6 7
| curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh ./nezha.sh
curl -L https://cdn.jsdelivr.net/gh/naiba/nezha@master/script/install.sh -o nezha.sh && chmod +x nezha.sh CN=true ./nezha.sh
|
宝塔
1 2 3 4 5 6 7 8
| 挂载数据盘 https://www.bt.cn/bbs/thread-3187-1-1.html
安装面板 https://www.bt.cn/bbs/thread-19376-1-1.html
卸载面板 https://www.bt.cn/bbs/thread-9043-1-1.html
|
宝塔秒级监控
1 2 3 4 5 6 7 8 9 10 11 12 13
| #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH step=1 for (( i = 0; i < 60; i=(i+step) )); do curl -sS --connect-timeout 10 -m 60 '网址' echo "----------------------------------------------------------------------------" endDate=`date +"%Y-%m-%d %H:%M:%S"` echo "[$endDate] OK" echo "----------------------------------------------------------------------------" sleep $step done exit 0
|
Screen
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| screen -S i
screen -ls
screen -r i
screen -X -S i quit
screen -wipe
|
Git
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| git config --global user.name "wkwbk" git config --global user.email "[email protected]"
git clone https://github.com/wkwbk/wkwbk.github.io.git
git add .
git commit -m 'lisir.me'
git push origin main
|
待更新、、、