侧边栏壁纸
博主头像
Blog

行动起来,活在当下

  • 累计撰写 23 篇文章
  • 累计创建 1 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录

个人自用脚本分享

Administrator
2024-10-31 / 0 评论 / 0 点赞 / 1 阅读 / 0 字

到手测试

# 融合怪
curl -L https://github.com/spiritLHLS/ecs/raw/main/ecs.sh -o ecs.sh && chmod +x ecs.sh && bash ecs.sh
# NodeLoc聚合测评脚本
# https://github.com/everett7623/nodeloc_vps_test

# CentOS
yum install wget&&wget -O Nlbench.sh https://raw.githubusercontent.com/everett7623/nodeloc_vps_test/main/Nlbench.sh && chmod +x Nlbench.sh && ./Nlbench.sh

# Debian/Ubuntu/Deepin
wget -O Nlbench.sh https://raw.githubusercontent.com/everett7623/nodeloc_vps_test/main/Nlbench.sh && chmod +x Nlbench.sh && ./Nlbench.sh
# ip解锁
bash <(curl -Ls IP.Check.Place)
# 路由追踪
curl nxtrace.org/nt |bash
# 查看vps回程路由
nexttrace 你的宽带ip
# 测试本机网络信息、IPV4/IPV6 三网回程TCP路由,本机到指定 IPV4/IPV6 TCP路由
wget -N --no-check-certificate https://raw.githubusercontent.com/Chennhaoo/Shell_Bash/master/AutoTrace.sh && chmod +x AutoTrace.sh && bash AutoTrace.sh
# iperf测速,测试单线程,如果重传严重需调整tcp缓冲区
apt update
apt install iperf3

# 电脑下载iperf3,命名iperf3.exe,打开文件夹,在地址栏输入cmd。-P是线程数,-R是测试小鸡到自己的速度,去掉则反之,-t是时间
iperf3.exe -c 小鸡的ip -P 1 -t 60 -R
# 检查是否超售
lsmod | grep virtio_balloon

VPS服务

# 大杂烩,好用推荐
curl -fsSL https://raw.githubusercontent.com/eooce/ssh_tool/main/ssh_tool.sh -o ssh_tool.sh && chmod +x ssh_tool.sh && ./ssh_tool.sh
# 科技lion脚本
bash <(curl -sL kejilion.sh)
# dd系统为debian,ssh端口不变,密码为LeitboGi0ro
# https://github.com/leitbogioro/Tools
apt update -y
apt install wget -y
wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh
bash InstallNET.sh -debian
# 另一个佬的,密码123@@@
# https://github.com/bin456789/reinstall
curl -O https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh || wget -O reinstall.sh $_
bash reinstall.sh dd --img https://example.com/xxx.xz
第三方
https://minlearn.org/inst
https://github.com/bohanyang/debi
https://github.com/LloydAsp/OsMutation
# 增加虚拟内存为2G,适合小内存vps,教程https://blog.laoda.de/archives/vps-swap与下面命令同理
# 根据自己vps内存修改,2G以下建议实际内存2倍,2-4G建议1.5倍
sudo swapon --show # 查看当前系统的交换空间配置,可以重启再运行这个命令看是否生效
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab # 固化
# 修改ssh端口,建议不要关闭ssh窗口防止连不上
sudo nano /etc/ssh/sshd_config
修改取消注释,把22改成你想要的端口
Port <你想要的端口>
sudo systemctl restart sshd
# 一键安装部署 Fail2ban,自动配置防 SSH 爆破。可自定义 ip 封禁时间,最高重试次数,ssh端口。

# 安装
wget https://raw.githubusercontent.com/FunctionClub/Fail2ban/master/fail2ban.sh
bash fail2ban.sh

# 卸载
wget https://raw.githubusercontent.com/FunctionClub/Fail2ban/master/uninstall.sh
bash uninstall.sh
# 修改为仅允许密钥登录,建议不要关闭ssh窗口防止连不上
nano ~/.ssh/authorized_keys #加入xshell等工具生成的公钥
chmod 600 ~/.ssh/authorized_keys
chmod 700 ~/.ssh
sudo nano /etc/ssh/sshd_config

修改
PasswordAuthentication no # 不允许密码登录
PubkeyAuthentication yes# 允许密钥登录

最后执行
sudo systemctl restart sshd
# 修改主机名解决无法解析主机名的问题,修改127.0.1.1后面的为正确主机名
nano /etc/hosts
# 增加dns
chattr -i /etc/resolv.conf && wget -N --no-check-certificate https://raw.githubusercontent.com/chengziqaq/dnsunblocknetflix/master/dns-change.sh && chmod +x dns-change.sh && ./dns-change.sh 要增加的dns

# 或者动修改nameserver
chattr -i /etc/resolv.conf# 解锁
sudo nano /etc/resolv.conf
chattr +i /etc/resolv.conf# 上锁
# tcp调优,通常对优化线路有用,降低重传增加稳定性
# 修改tcp缓冲区,重启失效,合理值公式如下:BDP = 带宽(bps) × 往返时延(RTT, 秒)
sudo sysctl -w net.ipv4.tcp_wmem="4096 524288 BDP"
sudo sysctl -w net.ipv4.tcp_rmem="4096 524288 BDP"

# 一键脚本
wget http://sh.nekoneko.cloud/tools.sh -O tools.sh && bash tools.sh

# 手动修改
nano /etc/sysctl.conf
加入
net.ipv4.tcp_wmem=4096 524288 7500000
net.ipv4.tcp_rmem=4096 524288 7500000
再执行
sysctl -p

# 别人的作业
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_ecn = 0
net.ipv4.tcp_frto = 0
net.ipv4.tcp_mtu_probing = 0
net.ipv4.tcp_rfc1337 = 0
net.ipv4.tcp_sack = 1
net.ipv4.tcp_fack = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_adv_win_scale = 1
net.ipv4.tcp_moderate_rcvbuf = 1
net.core.rmem_max = 33554432
net.core.wmem_max = 33554432
net.ipv4.tcp_rmem = 4096 87380 33554432
net.ipv4.tcp_wmem = 4096 16384 33554432
net.ipv4.udp_rmem_min = 8192
net.ipv4.udp_wmem_min = 8192
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr
* Applying /usr/lib/sysctl.d/50-pid-max.conf ...
kernel.pid_max = 4194304
* Applying /etc/sysctl.d/99-sysctl.conf ...
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_ecn = 0
net.ipv4.tcp_frto = 0
net.ipv4.tcp_mtu_probing = 0
net.ipv4.tcp_rfc1337 = 0
net.ipv4.tcp_sack = 1
net.ipv4.tcp_fack = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_adv_win_scale = 1
net.ipv4.tcp_moderate_rcvbuf = 1
net.core.rmem_max = 33554432
net.core.wmem_max = 33554432
net.ipv4.tcp_rmem = 4096 87380 33554432
net.ipv4.tcp_wmem = 4096 16384 33554432
net.ipv4.udp_rmem_min = 8192
net.ipv4.udp_wmem_min = 8192
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr
* Applying /usr/lib/sysctl.d/protect-links.conf ...
fs.protected_fifos = 1
fs.protected_hardlinks = 1
fs.protected_regular = 2
fs.protected_symlinks = 1
* Applying /etc/sysctl.conf ...
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_ecn = 0
net.ipv4.tcp_frto = 0
net.ipv4.tcp_mtu_probing = 0
net.ipv4.tcp_rfc1337 = 0
net.ipv4.tcp_sack = 1
net.ipv4.tcp_fack = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_adv_win_scale = 1
net.ipv4.tcp_moderate_rcvbuf = 1
net.core.rmem_max = 33554432
net.core.wmem_max = 33554432
net.ipv4.tcp_rmem = 4096 87380 33554432
net.ipv4.tcp_wmem = 4096 16384 33554432
net.ipv4.udp_rmem_min = 8192
net.ipv4.udp_wmem_min = 8192
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr

# 安装哪吒探针
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
# 安装Alist
curl -fsSL "https://alist.nn.ci/v3.sh" | bash -s install
# sing-box+订阅
# https://github.com/fscarmen/sing-box
bash <(wget -qO- https://raw.githubusercontent.com/fscarmen/sing-box/main/sing-box.sh)
# mack-a 8合1 sing-box
# https://github.com/mack-a/v2ray-agent
wget -P /root -N --no-check-certificate "https://raw.githubusercontent.com/mack-a/v2ray-agent/master/install.sh" && chmod 700 /root/install.sh && /root/install.sh
# ygkkk sing-box
# https://github.com/yonggekkk/sing-box-yg
bash <(curl -Ls https://gitlab.com/rwkgyg/sing-box-yg/raw/main/sb.sh)
# 223boy sing-box
# https://233boy.com/sing-box/sing-box-script/
bash <(wget -qO- -o- https://github.com/233boy/sing-box/raw/main/install.sh)
# 安装3x-ui
# https://github.com/MHSanaei/3x-ui
bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh)
# 安装warp解锁
# https://github.com/fscarmen/warp-sh
# 首次运行
wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh [option] [lisence/url/token]
# 再次运行
warp [option] [lisence]
# 端口转发,使用下面的脚本或者xui的dokodemo
# releam一键脚本
wget -N https://raw.githubusercontent.com/qqrrooty/EZrealm/main/realm.sh && chmod +x realm.sh && ./realm.sh
# gost脚本
wget --no-check-certificate -O gost.sh https://raw.githubusercontent.com/qqrrooty/EZgost/main/gost.sh && chmod +x gost.sh && ./gost.sh
# 盒子刷流
bash <(wget -qO- https://raw.githubusercontent.com/jerry048/Dedicated-Seedbox/main/Install.sh) -u <帐号> -p <密码> -c 3072 -q 4.3.9 -l v1.2.19 -b -v

Docker相关

# 安装Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# lucky 反代+自动申请证书,非常好用适合小白
docker run -d --name lucky --restart=always --net=host gdy666/lucky
# Filebrowsr文件浏览器
# https://filebrowser.org/installation
# 微信消息转发,用于moviepilot和nastool,教程
https://invites.fun/d/14844
https://github.com/DDS-Derek/wxchat-Docker

# 安装xboard
https://github.com/cedar2025/Xboard/blob/dev/docs/docker-compose%E5%AE%89%E8%A3%85%E6%8C%87%E5%8D%97.md

# 安装v2bx
wget -N https://raw.githubusercontent.com/wyx2685/V2bX-script/master/install.sh && bash install.sh

# 安装xrayr
wget -N https://raw.githubusercontent.com/XrayR-project/XrayR-release/master/install.sh && bash install.sh
# 安装notepad网络记事本(没啥用玩玩)配合下面的tgbot可以做到收藏整理的功能
mkdir /root/docker/docker_data/notepad
chmod -R 777 /root/docker/docker_data/notepad
docker run -d --name notepad --restart always -p 5000:80 -v /data/docker_data/notepad:/var/www/html/_tmp jdreinhardt/minimalist-web-notepad:latest

# 安装tgbot实现收藏整理,详情见https://github.com/AhFeil/extract_forward_tgbot
# 第一步
myserve="ef_tgbot"
mkdir -p ~/myserve/$myserve && cd ~/myserve/$myserve && mkdir -p forward_message configs

# 第二步
cat > configs/config.yaml << EOF
is_production: true
chat_id: 你的tg用户ID # 自行填入
bot_token: 你的bot token
push_dir: 你的网页记事本,注意结尾要带上/
EOF

# 第三步
cat > docker-compose.yml << EOF
---

version: "3"

services:
  tgbot:
    image: ahfeil/extract_forward_tgbot:latest
    container_name: efTGbot
    restart: always
    volumes:
      - ./configs:/ef_tgbot/configs
      - ./forward_message:/ef_tgbot/forward_message
EOF
# 最后
docker compose pull
docker compose up -d

一些有用的东西

注册教程

https://linux.do/t/topic/241581
https://linux.do/t/topic/245276

科普

https://www.tjsky.net/tutorial/633
https://blog.sunflyer.cn/archives/594
https://github.com/XTLS/Xray-core/issues/2005
https://github.com/XTLS/Xray-core/discussions/2256
https://github.com/XTLS/Xray-core/issues/2299
https://www.nodeseek.com/post-166418-1
https://www.nodeseek.com/post-1033-1

美西测评

https://www.nodeseek.com/post-109380-1

教程

注册paypal

Dns解锁

https://www.nodeseek.com/post-102471-1
https://www.nodeseek.com/post-176277-1
https://www.nodeseek.com/post-178052-1
https://www.nodeseek.com/post-180592-1

哪吒探针相关

wiki
教程
美化
TCP PING地址 # tcp准一点,反应真实情况
ICMP PING地址
ICMP PING地址

TCP调优

https://www.nodeseek.com/post-171361-1
https://www.nodeseek.com/post-37225-1
https://www.nodeseek.com/post-141148-1
https://www.nodeseek.com/post-65411-1

端口转发

https://www.nodeseek.com/post-171363-1
https://www.nodeseek.com/post-179931-1

cf搭建tgbot实现bot消息转发,保留消息防骗子

https://www.nodeseek.com/post-122678-1
https://www.nodeseek.com/post-31988-1

溢价计算器

https://tools.521990.xyz/mjj

剩余价值计算器

https://tools.196000.xyz/jsq/

图床

https://111666.best/

IP检测

DNS泄漏
DNS泄漏+服务检测
WebRtc泄漏检测
IP检测+ASN信息
IP检测
IP检测
IP检测+纯净度检测
IP纯净度检测
Ali运维检测
ITDOG

VPS测评,推荐小白看看,挑选心仪的小鸡,少走很多弯路

免责申明,VPS商家跑路与我无关,这是别人的测评站,没有坑小白所以推荐下,里面带了站长的AFF,介意可以自行去掉,不是我的 #AFF

https://digvps.com/review
https://p3terx.com/archives/cheap-and-costeffective-vps-recommended.html
https://vpsls.com
https://vpshub.org

0

评论区