proxy

package module
v0.0.0-...-af84169 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 12 Imported by: 0

README

go-reproxy

Forward proxy service to route requests from origin through one of random known third-party proxies.

Build


go build -ldflags "-s -w" -o ./out/proxy ./cmd

Run

Create proxies.txt in your workdir:

http://<user>:<pass>:<host>:<port>/
socks5://<user>:<pass>:<host>:<port>/

Run service:


./out/proxy --port 8080 --proxiesFile proxies.txt

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProxyRequestHandler

func NewProxyRequestHandler(proxyManager *ProxyManager, auth ProxyAuthConfig) *proxyRequestHandler

Types

type ProxyAuthConfig

type ProxyAuthConfig struct {
	User string
	Pass string
}

type ProxyManager

type ProxyManager struct {
	// contains filtered or unexported fields
}

func NewProxyManager

func NewProxyManager(proxies []*url.URL) (*ProxyManager, error)

func NewProxyManagerFromFile

func NewProxyManagerFromFile(filePath string) (*ProxyManager, error)

func (*ProxyManager) GetProxy

func (pm *ProxyManager) GetProxy() *url.URL

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL