A high-performance, multi-protocol proxy management server written in Go. Supports HTTP, HTTPS, and SOCKS5 protocols with SQLite-based authentication, vendor routing, and Prometheus monitoring.
- Multi-Protocol Support: HTTP, HTTPS, and SOCKS5 proxy protocols
- Authentication: SQLite-based user authentication with support for multiple vendors per user
- Routing: Intelligent routing to backend proxy vendors based on country and session requirements
- Monitoring: Built-in Prometheus metrics for connection tracking and performance monitoring
- Session Management: Per-session proxy assignment and tracking
- Country-Based Routing: Route traffic through proxies in specific countries
- Graceful Shutdown: Clean connection handling and resource cleanup
- Docker Support: Containerized deployment with health checks
- Go 1.23.0 or later (for development)
- Docker and Docker Compose (for containerized deployment)
Run the latest stable build:
docker run --rm --pull=always -p 8085:8085 ghcr.io/techfyi/proxymanager:latestRun the latest development build:
docker run --rm --pull=always -p 8085:8085 ghcr.io/techfyi/proxymanager:devRun a complete setup with Prometheus monitoring:
docker compose up -dThis will start:
- Proxy Manager on port 8085
- Prometheus monitoring endpoint on port 9091
- Prometheus server on port 9090
- Watchtower for automatic updates
cd myproxy
go run cmd/main.goThe server configuration is managed through myproxy/configs/server_config.json. Key settings include:
ingress_addr: Listening address and port (default::8085)monitoring_config: Prometheus metrics endpoint configurationdb_file: Path to SQLite database file for authenticationcredentials_file: Path to credentials JSON file (legacy)
curl -x user1-country-US-session-1234:pass1@127.0.0.1:8085 http://ip-api.comcurl -x user1-country-US-session-1234:pass1@127.0.0.1:8085 https://x.comUse any SOCKS5-compatible client with the same authentication credentials.
- Ingress Server: Handles incoming connections and protocol detection
- Authentication Manager: SQLite-based user authentication and credential management
- Router: Routes requests to appropriate backend proxy vendors
- Handlers: Protocol-specific handlers for HTTP, HTTPS, and SOCKS5
- Monitoring: Prometheus metrics collection and SQLite connection monitoring
myproxy/
├── cmd/
│ └── main.go # Application entry point
├── configs/ # Configuration files
├── internal/
│ ├── logging/ # Logging utilities
│ └── utils/ # Internal utilities
└── pkg/
├── config/ # Configuration management
├── db_auth/ # SQLite authentication
├── handlers/ # Protocol handlers
├── ingress/ # Ingress server
├── monitoring/ # Prometheus monitoring
└── routing/ # Request routing
cd myproxy
go build -o proxymanager cmd/main.goThe server exposes Prometheus metrics on the configured monitoring endpoint (default: :9091). Metrics include:
- Active connections
- Connection attempts
- Authentication failures
- Request routing statistics
Access Prometheus UI at http://localhost:9090 when using Docker Compose.
See LICENSE file for details.
Contributions are welcome. Please ensure all tests pass and follow the existing code style.
For issues and feature requests, please use the GitHub issue tracker.