Subscription proxy server for Remnawave and other panels. Merges external server sources into user subscriptions with deduplication, grouping, and optional ping checking.
- Proxies subscription requests to any backend (Remnawave, custom)
- Merges servers from multiple custom sources into the subscription
- Groups servers by source with labeled dividers
- Deduplicates across all sources and the original subscription
- Optional async ping probing for each server
- Configurable cache refresh interval
- REST API for status and manual refresh
- Clone the repo and copy
.env.exampleto.env:
cp .env.example .env- Edit
.envwith your backend URL and sources:
BACKEND_URL=http://remnawave:3000
SOURCE_1_LABEL=🇷🇺 Russia
SOURCE_1_URL=https://raw.githubusercontent.com/igareck/vpn-configs-for-russia/main/Vless-Reality-White-Lists-Rus-Mobile.txt
SOURCE_1_COUNT=10- Run with Docker Compose:
docker compose up -d| Method | Path | Description |
|---|---|---|
| GET | /{path} |
Transparent proxy: forwards any path to backend, merges subscription responses |
| GET | /health |
Health check |
| GET | /api/status |
Cache and source status |
| GET | /api/refresh |
Force cache refresh |
Sub-Proxy sits between the subscription page and the backend:
User → Subscription Page → Sub-Proxy → Backend
The subscription page sends all requests to Sub-Proxy (via REMNAWAVE_PANEL_URL).
Sub-Proxy forwards them to the backend, and when a subscription response is detected (base64-encoded proxy links), it merges cached servers from configured sources before returning.
No Caddy or reverse proxy changes are needed — Sub-Proxy stays internal to the Docker network.
- Make sure Sub-Proxy is on the same Docker network as Remnawave (e.g.
remnawave-network):
services:
sub-proxy:
build: .
container_name: sub-proxy
networks:
- remnawave-network
networks:
remnawave-network:
external: true- In the subscription page
.env, change the panel URL:
- REMNAWAVE_PANEL_URL=http://remnawave:3000
+ REMNAWAVE_PANEL_URL=http://sub-proxy:4080- Restart the subscription page container:
docker compose restart remnawave-subscription-pageThat's it. Sub-Proxy intercepts subscription requests, adds servers from configured sources, and passes everything else through unchanged.
| Variable | Default | Description |
|---|---|---|
BACKEND_URL |
— | Backend base URL (e.g. Remnawave panel) |
SOURCE_{ID}_LABEL |
— | Source group display name |
SOURCE_{ID}_URL |
— | Source URL (GitHub raw, HTTP sub, etc.) |
SOURCE_{ID}_COUNT |
10 |
Max servers from this source |
SOURCE_{ID}_PROBE |
false |
Enable ping check for this source |
SOURCE_{ID}_SQUADS |
— | Comma-separated short_uuids to restrict this source to (empty = all users) |
REFRESH_INTERVAL |
900 |
Cache refresh interval (seconds) |
DEDUP_ENABLED |
true |
Remove duplicate servers |
PROBE_TIMEOUT |
1.5 |
Ping timeout (seconds) |
PROBE_CONCURRENCY |
12 |
Concurrent ping checks |
MERGE_WHEN_EXPIRED |
true |
Merge sources even for expired/unsupported subs (false = only merge active subs) |
# Install dependencies
pip install -r requirements.txt
# Run tests
pytest tests/ -v
# Run locally
uvicorn app.main:app --reload --port 4080MIT