vproxy

package module
v0.0.0-...-378f8ce Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

A proxy that can change the bandwidth of the network.

forked: https://github.com/jamesmoriarty/goforward

install

$ go get github.com/ieee0824/valve-proxy
$ go install github.com/ieee0824/valve-proxy/cmd/vproxy

options

$ vproxy -h
Usage of vproxy:
  -d string
        Proxy downstream bandwidth ratelimit (default "10GB")
  -port string
        Proxy listen port (default "3128")
  -u string
        Proxy upstream bandwidth ratelimit (default "10GB")

docker

$ sudo docker build -t vproxy .
$ sudo docker run -it -p 3128:3128 vproxy -d 1M -u 1M
INFO[0000] listening on :3128, upload band :1Mbps, download band :1Mbps 

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Listen

func Listen(port string, upRate uint64, downRate uint64, shutdown <-chan os.Signal)

Types

type RateLimitedConn

type RateLimitedConn struct {
	net.Conn
	// contains filtered or unexported fields
}

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
cmd
vproxy command

Jump to

Keyboard shortcuts

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