Simple HTTP/HTTPS proxy - designed to be distributed as a self-contained binary that can be dropped in anywhere and run.

Simple Proxy

This is a simple HTTP/HTTPS proxy - designed to be distributed as a self-contained binary that can be dropped in anywhere and run.

Code based on the guide here: https://medium.com/@mlowicki/http-s-proxy-in-golang-in-less-than-100-lines-of-code-6a51c2f2c38c

Features

  • HTTP and HTTPS.
  • Can choose which port to run on.
  • Can specify paths to certificate and private key file to use.
  • Logs each proxied connection.
  • Log options can be supplied using glog.
    • Can choose the log verbosity with the -v flag.
    • Can choose to log to a file.
  • Basic authentication.
  • Can log request headers.
  • Can log failed authentication attempt details.
  • Printing version number.

Install

You can download the latest release for your architecture and operating system from the releases page.

Once you unzip the release package you can either run the binary directly, or you can add it into your PATH so it can be called from anywhere (e.g. the /usr/bin directory).

Linux AMD64

You can use wget to download and install the program to your /usr/bin directory by running these commands:

wget https://github.com/jthomperoo/simple-proxy/releases/download/v1.1.0/simple-proxy_linux_amd64.zip
unzip -d simple-proxy simple-proxy_linux_amd64.zip
cp simple-proxy/simple-proxy /usr/bin/simple-proxy
rm -r simple-proxy/ simple-proxy_linux_amd64.zip

Usage

You can download the binary and run the program directly (it is fully self contained).

Linux/MacOS

You can run the binary directly:

./simple-proxy

Windows

You can run the binary directly:

simple-proxy.exe

Options

The program has the following options, you can see this list by using the --help flag.

Usage of simple-proxy:
  -alsologtostderr
    	log to standard error as well as files
  -basic-auth string
    	basic auth, format 'username:password', no auth if not provided
  -cert string
    	path to cert file
  -key string
    	path to key file
  -log-auth
    	log failed proxy auth details
  -log-headers
    	log request headers
  -log_backtrace_at value
    	when logging hits line file:N, emit a stack trace
  -log_dir string
    	If non-empty, write log files in this directory
  -logtostderr
    	log to standard error instead of files
  -port string
    	proxy port to listen on (default "8888")
  -protocol string
    	proxy protocol (http or https) (default "http")
  -stderrthreshold value
    	logs at or above this threshold go to stderr
  -timeout int
    	timeout in seconds (default 10)
  -v value
    	log level for V logs
  -version
    	prints current simple-proxy version
  -vmodule value
    	comma-separated list of pattern=N settings for file-filtered logging

Contributing

See the CONTRIBUTING and CODE OF CONDUCT documents.

Owner
Jamie Thompson
Jamie Thompson.
Jamie Thompson
Similar Resources

Golang terminal ANSI OSC52 wrapper. Copy text to clipboard from anywhere.

go-osc52 A terminal Go library to copy text to clipboard from anywhere. It does so using ANSI OSC52. The Copy() function defaults to copying text from

Dec 6, 2022

A simple tool to convert socket5 proxy protocol to http proxy protocol

Socket5 to HTTP 这是一个超简单的 Socket5 代理转换成 HTTP 代理的小工具。 如何安装? Golang 用户 # Required Go 1.17+ go install github.com/mritd/s2h@master Docker 用户 docker pull m

Jan 2, 2023

HTTP proxy written in Go. COW can automatically identify blocked sites and use parent proxies to access.

COW (Climb Over the Wall) proxy COW 是一个简化穿墙的 HTTP 代理服务器。它能自动检测被墙网站,仅对这些网站使用二级代理。 English README. 当前版本:0.9.8 CHANGELOG 欢迎在 develop branch 进行开发并发送 pull

Jan 9, 2023

inlets-connect is a proxy that supports HTTPS and the CONNECT method

inlets-connect inlets-connect is a proxy that supports HTTPS and the CONNECT method. It can be deployed as a side-car or stand-alone to proxy to a sin

Nov 7, 2022

MOSN is a cloud native proxy for edge or service mesh. https://mosn.io

MOSN is a cloud native proxy for edge or service mesh. https://mosn.io

中文 MOSN is a network proxy written in Golang. It can be used as a cloud-native network data plane, providing services with the following proxy functio

Dec 30, 2022

Http-server - A HTTP server and can be accessed via TLS and non-TLS mode

Application server.go runs a HTTP/HTTPS server on the port 9090. It gives you 4

Feb 3, 2022

llb - It's a very simple but quick backend for proxy servers. Can be useful for fast redirection to predefined domain with zero memory allocation and fast response.

llb What the f--k it is? It's a very simple but quick backend for proxy servers. You can setup redirect to your main domain or just show HTTP/1.1 404

Sep 27, 2022

provides alternative to simlinking with a configurable proxy binary

Shim Shim is a standalone binary used for shimming executables instead of relying on symlinks. Shim is based on the chocolatey shim https://docs.choco

Oct 21, 2021

Implementing SPEEDEX price computation engine in Golang as a standalone binary that exchanges can call

speedex-standalone Implementing SPEEDEX price computation engine in Golang as a standalone binary that exchanges can call. Notes from Geoff About Tato

Dec 1, 2021
Comments
  • Basic Auth not working

    Basic Auth not working

    Thank you for providing this script. Works perfectly without authentication. But when starting with basic auth, and adding the correct credentials to my browser, I always get "Unauthorized"... Tested starting with with --basic-auth 'user:pass' // --basic-auth user:pass // -basic-auth 'user:pass' // -basic-auth user:pass

Related tags
mt-multiserver-proxy is a reverse proxy designed for linking multiple Minetest servers together

mt-multiserver-proxy mt-multiserver-proxy is a reverse proxy designed for linking multiple Minetest servers together. It is the successor to multiserv

Nov 17, 2022
httpx is a fast and multi-purpose HTTP toolkit allows to run multiple probers using retryablehttp library, it is designed to maintain the result reliability with increased threads.
httpx is a fast and multi-purpose HTTP toolkit allows to run multiple probers using retryablehttp library, it is designed to maintain the result reliability with increased threads.

Features • Installation • Usage • Running httpx • Notes • Join Discord httpx is a fast and multi-purpose HTTP toolkit allow to run multiple probers us

Jan 8, 2023
This is a tool that will proxy simple HTTPS requests to an external HTTP endpoint
 This is a tool that will proxy simple HTTPS requests to an external HTTP endpoint

AcmeShield A secured HTTP proxy that forwards requests from a remote service(Postman). This is a tool that will proxy simple HTTPS requests to an exte

Mar 21, 2022
Tapestry is an underlying distributed object location and retrieval system (DOLR) which can be used to store and locate objects. This distributed system provides an interface for storing and retrieving key-value pairs.

Tapestry This project implements Tapestry, an underlying distributed object location and retrieval system (DOLR) which can be used to store and locate

Mar 16, 2022
Http-logging-proxy - A HTTP Logging Proxy For Golang

http-logging-proxy HTTP Logging Proxy Description This project builds a simple r

Aug 1, 2022
Swiss Army knife Proxy tool for HTTP/HTTPS traffic capture, manipulation, and replay on the go.
Swiss Army knife Proxy tool for HTTP/HTTPS traffic capture, manipulation, and replay on the go.

Features • Installation • Usage • Running Proxify • Installing SSL Certificate • Applications of Proxify • Join Discord Swiss Army Knife Proxy for rap

Jan 8, 2023
Goproxy - HTTP/HTTPS Forward and Reverse Proxy

Go HTTP(s) Forward/Reverse Proxy This is intended to provide the proxy for the goproxy frontend. It is currently a work in progress, and is not very s

Jan 4, 2022
Websockify-go - A reverse proxy that support tcp, http, https, and the most important, noVNC, which makes it a websockify

websockify-go | mproxy a reverse proxy that support tcp, http, https, and the mo

Aug 14, 2022
HTTP, HTTP2, HTTPS, Websocket debugging proxy
HTTP, HTTP2, HTTPS, Websocket debugging proxy

English | 简体中文 We recommend updating whistle and Node to ensure that you receive important features, bugfixes and performance improvements. Some versi

Dec 31, 2022
Local Portable HTTP/HTTPS Proxy

SkelgoKey Portable Local Web Proxy - Creates a local proxy that bypasses any network certificate checks - USAGES Windows .\SkeletonKey.exe (web addres

Oct 13, 2021