This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # | |
| # Title: add-swap-debian-ubuntu.sh | |
| # Description: A streamlined script to add a swap file on Debian/Ubuntu systems. | |
| # Interactively asks for size, with a 2x RAM default. | |
| # Date: 2025-06-10 | |
| # Exit immediately if a command exits with a non-zero status. | |
| set -e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # ============================================================================== | |
| # Debian/Ubuntu 代理服务器优化脚本 (v2025.12-fixed) | |
| # | |
| # 适用场景: <100 用户的代理服务及小型网站,注重弱网环境下的性能与稳定性。 | |
| # 核心优化: 开启 BBRv1, 优化 TCP 参数, 调整文件句柄, 禁用 IPv6。 | |
| # 特点: 安全、幂等 (可重复运行)、智能验证、有详细注释。 | |
| # 修复: 自动加载 nf_conntrack 模块,避免 sysctl 参数应用失败 | |
| # ============================================================================== |