Skip to content

nebojsaj1726/proxy-pool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Proxy Pool

Manages HTTP proxies, performs health checks, stores their state in SQLite, and provides authenticated endpoints for allocation and monitoring.


Features

  • Proxy allocation and monitoring API
  • Automatic health checks for proxies
  • Maintains proxy stats: alive/dead status, score, usage, success/fail counts, latency
  • SQLite database storage
  • Optional web dashboard for visualization and proxy management
  • CLI-friendly: interact via curl or any HTTP client

Installation

  1. Clone the repository
git clone https://github.com/yourusername/proxy-pool.git
cd proxy-pool
  1. Install Go dependencies
go mod tidy
  1. Create your configuration file

Create config.yaml in the project root. You can refer to config.example.yaml for the required structure — make sure you enter your own proxy URLs.

  1. Create your env file

Create .env file in the project root. You can copy .env.example for the required variables.


Usage

Run the proxy API server

Start the API server with:

make run

This starts the API server on http://localhost:8080.

Interact with API

Login

curl -X POST http://localhost:8080/auth/login \
	-H "Content-Type: application/json" \
	-d '{"username":"admin","password":"password"}'

Register

curl -X POST http://localhost:8080/auth/register \
	-H "Content-Type: application/json" \
	-d '{"username":"admin","password":"password"}'

List proxies

curl -H "Authorization: Bearer <TOKEN>" http://localhost:8080/proxies

Allocate a proxy

curl -X POST -H "Authorization: Bearer <TOKEN>" http://localhost:8080/allocate

Get proxy statistics

curl -H "Authorization: Bearer <TOKEN>" http://localhost:8080/proxies/stats

Optional: Run the web dashboard

make web

The web dashboard allows you to:

  • View proxies and their status
  • Allocate a proxy with one click
  • View historical proxy stats

About

Proxy pool service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors