goforward

package module
v0.0.0-...-e4edd09 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2021 License: MIT Imports: 10 Imported by: 0

README

Goforward

Latest Tag Go Report Card GitHub Workflow Status GitHub Releases

Go forward proxy with rate limiting. The code is based on Michał Łowicki's 100 LOC forward proxy.

Screenshot

Download

Releases can be downloaded from here.

Install

go get -v github.com/jamesmoriarty/goforward
go install github.com/jamesmoriarty/goforward

Usage

goforward
goforward -h
Usage of goforward:
  -port string
        Proxy listen port (default "8888")g
  -rate int
        Proxy bandwidth ratelimit (default 524288)

use with .exe on windows.

Build

go build .\cmd\goforward.go

Test

go test

Why

I needed a way to download 53GB without making my household internet unusable. In summary:

  1. Free games.
  2. Australia's terrible internet.
  3. Learning Go.

First Solution

Shape the traffic in the application.

Application Bandwidth Shaping

Second Solution

Shape the traffic in kernal space.

Windows Filtering Platform

Third Solution

Shape the traffic in user space.

Forward Proxy

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Listen

func Listen(port string, rate int, shutdown <-chan os.Signal)

Types

type RateLimitedConn

type RateLimitedConn struct {
	net.Conn
	*ratelimit.Bucket
}

func (RateLimitedConn) Read

func (wrap RateLimitedConn) Read(b []byte) (n int, err error)

func (RateLimitedConn) Write

func (wrap RateLimitedConn) Write(b []byte) (n int, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL