Simple http proxy server implemented in Go
Go to file
2023-10-31 21:06:20 +03:00
.gitignore initial commit 2023-10-31 21:05:50 +03:00
build.sh initial commit 2023-10-31 21:05:50 +03:00
go.mod initial commit 2023-10-31 21:05:50 +03:00
main.go fix(main.go): add validation for AUTH_USERNAME and AUTH_PASSWORD to ensure both are provided or neither is provided 2023-10-31 21:06:08 +03:00
README.md chore(README.md): add README.md file with instructions on how to run the proxy server and its features 2023-10-31 21:06:20 +03:00

Simple HTTP Tunneling Proxy Server in Go

This is a lightweight proxy server written in Go that supports HTTP requests and HTTPS tunneling.

Features

  • Proxying HTTP requests
  • Tunneling HTTPS requests
  • Optional Basic Proxy Authentication
  • Customizable port, username, and password using command-line arguments
  • Logging

Requirements

  • Go (version 1.x+)

Usage

Running the Proxy from source

  1. Clone the repository:
git clone https://github.com/xzeldon/http-proxy-server.git
cd http-proxy-server
  1. Run the proxy:
go run main.go --port <PORT> [--username <USERNAME> --password <PASSWORD>]

By default, the proxy will run on port 3000. If both --username and --password are omitted, authentication will be bypassed.

For example:

  • To run the proxy on port 1489 without authentication:
go run main.go --port 1489
  • To run the proxy on port 1489 with authentication:
go run main.go --port 1489 --username admin --password admin123

Authentication

If you specify both --username and --password when starting the proxy, it will enforce Basic Proxy Authentication with the given credentials. If these parameters are omitted, the proxy will not require authentication.