Skip to content

A lightweight Go-based proxy server that blocks incoming requests by IP, headers, or query parameters. Includes a simple CLI for dynamic rule management and secure backend proxying.

Notifications You must be signed in to change notification settings

rfbatista/goproxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoProxy

GoProxy is a lightweight proxy server built in Go, designed to block incoming requests based on IP address, headers, or query parameters. It provides an easy-to-use CLI to manage blocking rules and acts as a secure gateway to your backend services.

Features

  • Block requests by IP address.
  • Block requests based on headers or query parameters (extendable).
  • Simple CLI to manage block rules dynamically.
  • Transparent proxying to your backend.

Getting Started

Prerequisites

  • Go installed on your system (version 1.18 or higher recommended).

Running the Proxy Server

To start the proxy server, run the following command:

go run ./cmd/server <BACKEND_URL>

<BACKEND_URL>: The URL of the backend service to which requests will be proxied.

Example

go run ./cmd/server https://www.youtube.com/

By default, the proxy listens on http://localhost:8080.

Blocking an IP Address

To block an IP address from accessing the proxy, use the following command:

go run ./cmd/cli block <IP_ADDRESS>

Example:

go run ./cmd/cli block ::1

The specified IP will no longer be able to send requests through the proxy.

About

A lightweight Go-based proxy server that blocks incoming requests by IP, headers, or query parameters. Includes a simple CLI for dynamic rule management and secure backend proxying.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published