Simple http proxy server implemented in Go
Go to file
2023-10-31 21:16:18 +03:00
.github/workflows chore(release.yml): remove executable compression step to simplify the release process 2023-10-31 21:16:18 +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 chore(go.mod): update module path 2023-10-31 21:06:32 +03:00
LICENSE feat: implement release workflow and add license file 2023-10-31 21:06:29 +03:00
main.go fix(main.go) code refactoring and comments 2023-10-31 21:06:26 +03:00
README.md docs(README.md): change heading 2023-10-31 21:06:40 +03:00

HTTP Proxy Server

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

Mirror on my Git

Features

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

Prerequisites

  • Golang (if building from source)

Usage

Running the Proxy

For Darwin/Linux:

  1. Download the latest release for your platform from GitHub releases

  2. Extract the downloaded archive:

    tar -xvzf http-proxy-server-v{version}-{platform}-{arch}.tar.gz
    
  3. Navigate to the extracted folder:

    cd http-proxy-server-v{version}-{platform}-{arch}
    
  4. Run the proxy:

    ./http-proxy-server --port <PORT> [--username <USERNAME> --password <PASSWORD>]
    

For Windows:

  1. Download the latest release for Windows from GitHub releases

  2. Extract the downloaded ZIP archive

  3. Navigate to the extracted folder.

  4. Open a command prompt in this directory.

  5. Run the proxy:

    proxy_name.exe --port <PORT> [--username <USERNAME> --password <PASSWORD>]
    

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.

License

This project is licensed under the MIT License.