A powerful proxy configuration manager with load balancing capabilities, featuring an interactive TUI interface, automatic certificate management, and flexible backend switching strategies.
This project is for learning and personal use only. Do not use it for any illegal purposes.
- Pool-based Link Management: Organize backend proxy links into pools with different scheduling policies
- Per-link Traffic Metadata: Store optional traffic quota (GB) and monthly reset schedule for each backend link
- Multiple Scheduling Policies: Support for round-robin, random, and least-connection strategies
- Proxy Config Generator: Interactive wizard to generate proxy configurations with VLESS/Trojan inbounds
- Balancer Daemon: Scheduled backend switching with configurable intervals (fixed/random)
- ACME Certificate Management: Automatic Let's Encrypt certificate issuance and renewal (HTTP-01/DNS-01)
- TUI Interface: User-friendly terminal-based configuration management
- i18n Support: Multi-language support (Chinese and English)
- Runtime Management: Start/stop proxy and balancer daemon with ease
Notes:
- Inbounds (generated by the wizard):
vless,trojan - Backend links/outbounds (in pools):
vless,vmess,trojan - Transports: the wizard supports
tcp/ws/http/xhttp - Currently only tested with
vless + tcp + noneandvless + tcp + reality
- Go 1.25 or higher
- Proxy binary (default:
xrayin PATH)
git clone https://github.com/aimerick/shareport.git
cd shareport
go build -o shareportPushing a tag like v0.1.0 triggers a GitHub Actions workflow that builds per-platform binaries for Linux/macOS/Windows and attaches them to a GitHub Release.
git tag v0.1.0
git push origin v0.1.0Release notes are generated via Release Drafter (based on PR labels) when you publish a tag release.
- Initialize Configuration
./shareport --initThis will launch an interactive wizard to set up your initial configuration.
- Run Shareport
./shareport| Flag | Description |
|---|---|
--print-next |
Print next backend link and exit |
--generate |
Interactive proxy config generator mode |
--balancer-daemon |
Run balancer scheduler daemon (internal) |
--db <path> |
SQLite database path (default: .shareport/shareport.db) |
--init |
Force interactive init wizard to recreate config |
--xray-config <path> |
Proxy config output path (default: .shareport/config.json) |
--xray-bin <path> |
Proxy binary path or name (default: xray) |
--lang <lang> |
Language (zh or en, default: zh) |
| Variable | Description |
|---|---|
SHAREPORT_LANG |
Language preference (zh or en) |
.shareport/
├── shareport.db # SQLite database
├── config.json # Generated proxy config
├── runtime.log # Proxy logs
└── balancer-daemon.log # Balancer daemon logs
A pool contains backend proxy links with a scheduling policy:
{
"default_pool": "pool1",
"pools": [
{
"name": "pool1",
"policy": "round_robin",
"links": [
"vless://...",
"vmess://...",
"trojan://..."
]
}
]
}round_robin: Rotate through links in orderrandom: Randomly select a linkleast_conn: Select link with least active connections
- View Current Config - Display current configuration
- Manage Pools - Add, delete, or set default pools
- Manage Backend Links - Add or remove links from pools
- Runtime Management - Start/stop proxy and balancer
- Regenerate Config - Interactive proxy config generator
- Renew Certificates - Renew ACME certificates
- Exit - Exit the program
- Balancer Manager: Start/stop balancer and scheduled switching
- Change Scheduling Policy: Update pool scheduling strategies
The balancer supports multiple switching strategies:
| Strategy | Description |
|---|---|
| Off | Default to node-1 (no switching) |
| Interval (Fixed) | Switch at fixed time intervals (10-1800 seconds) |
| Interval (Random) | Switch at random intervals within a range |
| Per Connection | Trigger switching on each new connection (based on proxy access logs) |
Shareport supports automatic certificate issuance via ACME:
- HTTP-01: Requires port 80 to be reachable
- DNS-01: Manual DNS TXT record verification
Use the "Renew Certificates" option in the main menu to renew expired certificates.
shareport/
├── main.go # Entry point and CLI flag parsing
├── cli/ # TUI interface and wizards
├── components/ # ACME, link parsing, pool logic, metadata
├── config/ # Configuration and database handling
├── i18n/ # Internationalization
├── runtime/ # Runtime process management
├── ui/ # TUI utilities
└── core/ # Proxy config generation
pools- Pool definitions (name, policy)links- Backend links per pool (ordered by position)settings- UI/generator configurationruntime_state- Runtime state (PIDs, daemon status)
[Specify your license here]
Contributions are welcome! Please feel free to submit a Pull Request.