Skip to content

Rotating proxy pool usable as a client or HTTPS CONNECT server

License

Notifications You must be signed in to change notification settings

aidenesco/connect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

connect GoDoc Go Report Card

This package distributes requests through a pool of proxies, acting as a proxy gateway that supports CONNECT requests. Proxy rotation spreads out usage as much as possible to avoid IP bans or restrictions. The gateway only accepts proxy urls with the https scheme.

Installation

go get -u github.com/aidenesco/connect

Usage

Loading proxies

import "github.com/aidenesco/connect"

func main() {
    pool := connect.NewPool()

    proxyUrl, _ := url.Parse("https://username:password@host:port")

    _ = pool.AddProxy(proxyUrl)

Server

import "github.com/aidenesco/connect"

func main() {
    pool := connect.NewPool()
    //Load pool with your proxies

    server := &http.Server{
        Addr:         ":443",
        Handler:      http.HandlerFunc(pool.Serve),
        TLSNextProto: make(map[string]func(*http.Server, *tls.Conn, http.Handler)),
    }

    log.Fatal(server.ListenAndServeTLS("your-cert", "your-key"))
}

About

Rotating proxy pool usable as a client or HTTPS CONNECT server

Topics

Resources

License

Stars

Watchers

Forks

Languages