GithubHelp home page GithubHelp logo

httpproxy's Introduction

HTTP(S) Proxy

A Standard HTTP(S) proxy server.

If secrets file is changed, it will be reloaded automatically.

Installation

curl -Lo- https://github.com/sunshineplan/httpproxy/releases/latest/download/release-linux.tar.gz | tar zxC .
chmod +x httpproxy
./httpproxy install
./httpproxy start

You can also build your own binary by:

git clone https://github.com/sunshineplan/httpproxy.git
cd httpproxy
go build

Usage

Common Command

  --host <string>
    	Listening host
  --port <number>
    	Listening port
  --mode <string>
    	Specify server or client mode (default: server)
  --access-log <file>
    	Path to access log file
  --error-log <file>
    	Path to error log file
  --update <url>
    	Update URL

Server Command

  --https
    	Serve as HTTPS proxy server
  --cert <file>
    	Path to certificate file
  --privkey <file>
    	Path to private key file
  --secrets <file>
    	Path to secrets file for Basic Authentication
  --whitelist <file>
    	Path to whitelist file
  --status <file>
    	Path to status file
  --keep number
    	Count of status files (default: 100)

Client Command

  --proxy <string>
    	Proxy address
  --username <string>
    	Username for Basic Authentication
  --password <string>
    	Password for Basic Authentication

Service Command

  install
    	Install service
  uninstall/remove
    	Uninstall service
  run
    	Run service executor
  test
    	Run service test executor	
  start
    	Start service
  stop
    	Stop service
  restart
    	Restart service
  update
    	Update service files if update url is provided

Example config

config.ini(server)

mode       = server
host       = 0.0.0.0
port       = 443
https      = true
cert       = cert.pem
privkey    = privkey.pem
access-log = /var/log/httpproxy/access.log
error-log  = /var/log/httpproxy/error.log

config.ini(client)

mode     = client
port     = 1080
proxy    = https://proxy:443
username = proxy
password = proxy

whitelist

8.8.8.8
10.0.0.0/8

secrets

user1:password1
user2:password2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.