go-proxy

command module
v0.0.0-...-6db48bc Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

README

go-proxy

This is a proxy written in go.

There are some environment variables to configure go-proxy.

  • API_PROXYBIND = Thats the IP of the interface where the proxy should listening. Default value is "0.0.0.0".
  • API_PROXYPORT = Thats the Port where the proxy is listening. Default value is 10777.
  • TARGET_URL = Thats the URL to where all the requests will be forwarded. No default value.
  • SKIP_SSL = Do not check the ssl certificate of the target url. Default value is false.
  • BLOCK_USERAGENT = With these variable, it is possible to block UserAgents. No default value.
  • BLOCK_URL = Same like BLOCK_USERAGENT. Only for the URL String included GET parameters. No default value.
  • LOGLEVEL = The loglevel of the output. Default value "info".

How to run

docker run -e TARGET_URL=https:// -p 10777:10777 avhost/go-proxy:latest

How to Block UserAgents

To block Bots and Spam who does not respect robots.txt, it is possible to defined and list with UserAgend should be blocked. As example:

BLOCK_USERAGENT="(Bot|The World)"

This will block all UserAgents with the string "Bot" or "The World".

How to Block URL's

To block whole URL's, you can use regular expression to create a filter.

BLOCK_USERAGENT="(arg=1|private)"

This will block every access to the URL with the GET parameter "arg=1" or the string "private".

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳