Preface
Recently, I set aside some time and managed to clear all the accumulated issues in one go. It’s hard to believe that 412 days have passed since the first commit of this project, and we’ve already gained 1.2k stars. The continuous support and feedback from everyone are the biggest motivation for maintaining this—thank you!
I recommend reading the repository’s README for detailed instructions and descriptions. If you encounter any issues or have new feature requests, feel free to open an issue at any time.
Repository Address:
Core Updates at a Glance 20260902
Network Forwarding Script xwPF.sh
- Forwarding protocol options: pure TCP / pure UDP / dual stack; the status bar now shows [pure TCP] / [pure UDP] tags
- Improved systemd and OpenRC configurations: the realm service now auto-restarts on abnormal exit and has circuit breaker logic to prevent repeated crashes from flooding the logs
Port Traffic Dog port-traffic-dog.sh
- Added whole-server traffic monitoring (enabled by default), accumulates traffic from the time of installation, and automatically recalibrates after a system reboot or network interface reset
- Ports / port groups support setting expiration dates and will be automatically blocked upon expiry; if extended or set to 0, they will automatically recover
- Port group management now allows grouping of multiple ports and port ranges, sharing the same traffic statistics, quota, and speed limit rules
- Push notification frequency can now be set to minute/hour/day; Webhook (WeChat Work / Feishu / DingTalk) and Telegram support custom API Host for proxy relays
- Bidirectional speed limiting added; both upstream and downstream bandwidth limits are now supported
Script Introduction
Network Forwarding Script: xwPF.sh
Supports multiple Linux distributions (Debian/Ubuntu, Alpine, CentOS/RHEL), fully synced with the latest realm features, TUI numeric interactive menu, ready to use out of the box, shortcut command: pf.
Common Scenarios:
- For servers with a good network but poor IP reputation (IP not clean in the datacenter): use them as relays to forward to landing machines with good IPs but average network (residential broadband / clean IPs / domestic IPs that can’t access the outside), combining both advantages
- Tunnel forwarding: encapsulate realm inside ws/wss/tls encrypted transmissions
- Load balancing + failover: attach multiple landing endpoints to the same port for round-robin or IP-hash distribution, with automatic removal of failed nodes and automatic reintegration when they recover
One-Click Installation:
wget -qO- https://raw.githubusercontent.com/zywe03/realm-xwPF/main/xwPF.sh | sudo bash -s install
Port Traffic Dog: port-traffic-dog.sh

Lightweight Linux port traffic monitoring and management tool, supporting port-level and system-wide traffic stats, speed limiting, and traffic quota management
Common Scenarios
- Add lightweight monitoring and control capabilities for programs that lack traffic management
- VPS traffic control to prevent overage charges
- Cost management: reduce operational expenses through speed limits and traffic quotas
One-Click Installation
The port traffic dog script is a fully standalone script that can be installed and used independently (shortcut command dog)
Method 1: Direct Installation
wget -O port-traffic-dog.sh https://raw.githubusercontent.com/zywe03/realm-xwPF/main/port-traffic-dog.sh && chmod +x port-traffic-dog.sh && ./port-traffic-dog.sh