亚洲精品美女一区二区,亚洲欧美熟妇综合久久久,在线精品一区二区三蜜桃,皮皮影院,久久精品99国产aⅴ精品蜜桃,国产精品欧美一区二区,一本一本久久a久久精品综合,久久chinese 熟女

中文
當前位置: Overseas Hosting Reviews ? Resource News ? Tutorials ? 正文
Evoxt 廣告

TCP-Optimize: A script for in-depth TCP/UDP network optimization, ideal for optimizing VPS relay servers and high-latency cross-border connections

TCP-Optimize is a script designed for in-depth TCP/UDP network tuning on Linux VPS systems. It is primarily used to optimize system parameters, congestion control, buffers, connection queues, and connection tracking capabilities when a VPS is used as a network relay server.

For cross-border connections, high-latency links, and networks with high packet loss, the default Linux network parameters are often unsuitable for scenarios involving high concurrency or high-traffic forwarding. This script performs multiple kernel-level optimizations with a single click, lowering the barrier to manual configuration. It is suitable for use in scenarios such as transit nodes, proxy servers, cross-border business nodes, and remote connection acceleration.

TCP-Optimize: A script for in-depth TCP/UDP network optimization, ideal for optimizing VPS relay servers and high-latency cross-border connections

Features

IPv4 Priority Resolution

The script can set the DNS resolution priority to IPv4-first by adjusting gai.conf.

In some VPS environments, if the quality of the default IPv6 route is poor, issues such as slow connection handshakes, stuttering access, or route detours may occur. Enabling IPv4 priority can reduce connection problems caused by abnormal IPv6 routing and improve access stability.

BBR + FQ Congestion Control

The script supports enabling the Google BBR congestion control algorithm in conjunction with Fair Queue scheduling.

BBR is better suited for network environments such as high-latency and cross-border links; it can mitigate the impact of packet loss and retransmission to some extent, thereby improving single-threaded throughput performance. FQ queue scheduling helps improve packet queuing efficiency, making network forwarding more stable.

Production-Grade Kernel Parameter Tuning

TCP-Optimize dynamically calculates buffer parameters based on the server’s memory status—for example, setting the upper limit of network buffers as a percentage of total memory—while expanding the connection queue, optimizing TCP parameters, enabling IP forwarding, and adjusting the conntrack connection tracking table.

These parameters are crucial for VPS servers acting as relay servers, particularly in scenarios involving a large number of connections, extended forwarding periods, or mixed UDP/TCP traffic, as they help reduce connection bottlenecks and improve system capacity.

Multi-core RPS Distribution on Network Cards

The script supports enabling RPS, or Receive Packet Steering.

Once enabled, soft interrupts generated when the network card receives packets can be distributed across multiple CPU cores for processing, reducing the issue of excessive SoftIRQ consumption by a single core. For VPS instances with 2 or more cores, enabling RPS is generally more beneficial and is suitable for high-forwarding, high-concurrency network scenarios.

One-Click Configuration Rollback

TCP-Optimize also provides a one-click rollback feature, which cleans up the standalone configuration files generated by the script and restores memory-related parameters to their system defaults.

If you discover incompatibilities with certain services after optimization, or if you need to restore the system to its original state, you can quickly revert the configuration using the rollback feature to minimize testing risks.

Deployment Method

Method 1: Installation via GitHub Raw Link

We recommend using the GitHub Raw link for installation:

bash <(curl -sL https://raw.githubusercontent.com/Madhatter2099/TCP-Optimize/main/tcp.sh)

Once installation is complete, the script will automatically save to:

/usr/local/bin/tcp.sh

A shortcut command will also be created. In the future, simply enter the following command to open the script panel:

t

Method 2: Installing via jsDelivr CDN Acceleration

If raw.githubusercontent.com is inaccessible, you can use the jsDelivr CDN mirror for installation:

bash <(curl -sL https://cdn.jsdelivr.net/gh/Madhatter2099/TCP-Optimize@main/tcp.sh)

This method is suitable for server environments where GitHub Raw connections are unstable or access speeds are slow.

Method 3: Manual Download and Deployment

You can also manually download the script and create a shortcut command:

wget -O /usr/local/bin/tcp.sh https://raw.githubusercontent.com/Madhatter2099/TCP-Optimize/main/tcp.sh
chmod +x /usr/local/bin/tcp.sh
ln -sf /usr/local/bin/tcp.sh /usr/local/bin/t
t

Recommended Execution Order

When using for the first time, it is recommended to execute in the following order:

1. First, perform production-level kernel tuning

Priority:

選項 3:生產級內核調優

This option automatically includes core parameters such as BBR + FQ, buffer optimization, conntrack optimization, connection queue expansion, and IP forwarding; it is the most important optimization step in the entire script.

2. Enable IPv4 priority based on your network environment

If IPv6 is enabled on the VPS but the quality of the IPv6 egress routing is poor, we recommend continuing with:

選項 1:IPv4 優先

This will help avoid issues such as detours, slow handshakes, or unstable connections that may occur when some connections default to using IPv6.

3. For multi-core VPSs, it is recommended to enable RPS

If your VPS is configured with 2 cores or more, you can proceed to select:

選項 4:網卡多核分發

Once enabled, network interface software interrupts can be distributed across multiple CPU cores, reducing single-core bottlenecks and improving stability during high-concurrency forwarding.

Applicable Scenarios

TCP-Optimize is best suited for the following scenarios:

  1. VPS used as a network relay server;
  2. Optimization for cross-border connections with high latency and high packet loss;
  3. TCP/UDP forwarding services;
  4. Proxy nodes, tunnel nodes, and remote connection acceleration;
  5. High-concurrency connection or scenarios with a large number of long-running connections;
  6. Linux servers requiring optimization of BBR, conntrack, buffer, and queue parameters.

Please note that network optimization results may be affected by factors such as the VPS data center’s network lines, ISP routing, evening peak-hour congestion, and the quality of the target network. The script can optimize system-side parameters but cannot alter the quality of the upstream network lines themselves.

Usage Recommendations

We recommend running the script first on a brand-new server or in a test environment to ensure that services operate normally before deploying it to a production environment. If the VPS is already hosting critical services, we recommend backing up the current system configuration in advance, especially related configuration files such as /etc/sysctl.conf, /etc/sysctl.d/, and /etc/security/limits.conf.

For VPSs with limited memory, it is not recommended to blindly increase buffer parameters; for single-core VPSs, RPS optimization has limited value, so you should prioritize implementing BBR + FQ and basic kernel optimizations.

Open Source Page

Project URL:

https://github.com/Madhatter2099/TCP-Optimize

Brief Comments

TCP-Optimize has a clear focus, primarily targeting VPS network transit, cross-border link optimization, and high-concurrency connection scenarios. Compared to enabling BBR on its own, this script covers multiple key parameters—including IPv4 priority, BBR + FQ, kernel buffers, conntrack, connection queues, IP forwarding, and RPS multi-core distribution—making it ideal for users who want to quickly optimize their network.

If your VPS is primarily used for hosting websites and does not experience high traffic, the default network parameters are usually sufficient; however, if your VPS is used for cross-border relaying, proxy forwarding, remote connections, or transmission over high-latency links, then this type of optimization script will be more practical.

Overall, TCP-Optimize is better suited as a VPS network optimization tool. We recommend running it on a test node first and deploying it to production servers only after confirming stability.

公眾號二維碼
免責聲明:本博客不從事任何主機、服務器、云產品等租賃、銷售或中介業務,也不參與任何交易流程。站內內容僅用于記錄博主個人感興趣的服務器測評結果、網絡測試數據及部分服務器相關優惠活動信息。 本博客所發布的相關信息,部分來源于公開網絡資料,部分來自服務商主動提供,僅供個人記錄與信息整理之用。由于網絡產品、價格、線路、庫存、政策等信息可能隨時變化,本站不對內容的準確性、完整性、時效性及適用性作任何明示或暗示保證,亦不構成購買建議、投資建議或使用引導。 訪問者在瀏覽、參考或使用本站內容時,應自行甄別信息真實性與風險,并自行承擔由此產生的一切后果。本站不對因使用或參考相關內容而產生的任何直接、間接損失承擔責任。 訪問本博客及使用相關信息時,請務必遵守所在國家或地區有關互聯網、網絡安全、數據合規及相關法律法規。任何個人或組織不得利用本站提及的信息從事違法、違規或侵害他人權益的行為,否則由行為人自行承擔全部法律責任。 未成年人及不能獨立承擔法律責任的個人或群體,請勿訪問或使用本站相關內容。 一旦訪問本博客,即視為您已閱讀、理解并接受以上免責聲明內容。 版權聲明 本站原創內容采用 知識共享署名-非商業性使用-相同方式共享 4.0 國際許可協議(CC BY-NC-SA 4.0) 授權。轉載請注明原文出處及鏈接,禁止用于商業用途,轉載或改編內容需以相同協議發布。Overseas Hosting Reviews ? TCP-Optimize: A script for in-depth TCP/UDP network optimization, ideal for optimizing VPS relay servers and high-latency cross-border connections

相關文章