Skip to content

umerIcy/proxybridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Proxy Manager

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.

Features

  • 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

Requirements

  • Go 1.23.0 or later (for development)
  • Docker and Docker Compose (for containerized deployment)

Quick Start

Using Docker (Recommended)

Run the latest stable build:

docker run --rm --pull=always -p 8085:8085 ghcr.io/techfyi/proxymanager:latest

Run the latest development build:

docker run --rm --pull=always -p 8085:8085 ghcr.io/techfyi/proxymanager:dev

Using Docker Compose

Run a complete setup with Prometheus monitoring:

docker compose up -d

This will start:

  • Proxy Manager on port 8085
  • Prometheus monitoring endpoint on port 9091
  • Prometheus server on port 9090
  • Watchtower for automatic updates

Building from Source

cd myproxy
go run cmd/main.go

Configuration

The 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 configuration
  • db_file: Path to SQLite database file for authentication
  • credentials_file: Path to credentials JSON file (legacy)

Testing

HTTP Proxy

curl -x user1-country-US-session-1234:pass1@127.0.0.1:8085 http://ip-api.com

HTTPS Proxy

curl -x user1-country-US-session-1234:pass1@127.0.0.1:8085 https://x.com

SOCKS5 Proxy

Use any SOCKS5-compatible client with the same authentication credentials.

Architecture

  • 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

Development

Project Structure

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

Building

cd myproxy
go build -o proxymanager cmd/main.go

Monitoring

The 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.

License

See LICENSE file for details.

Contributing

Contributions are welcome. Please ensure all tests pass and follow the existing code style.

Support

For issues and feature requests, please use the GitHub issue tracker.

About

High-performance multi-protocol proxy management server with HTTP, HTTPS, and SOCKS5 support, SQLite authentication, and Prometheus monitoring

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors