Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abhishekkr/weeproxy
http reverse proxy for personal use
https://github.com/abhishekkr/weeproxy
go golang http load-balancer proxy proxy-server
Last synced: 2 months ago
JSON representation
http reverse proxy for personal use
- Host: GitHub
- URL: https://github.com/abhishekkr/weeproxy
- Owner: abhishekkr
- License: mit
- Created: 2019-02-02T09:49:10.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-13T19:49:42.000Z (almost 6 years ago)
- Last Synced: 2024-06-20T16:52:19.700Z (7 months ago)
- Topics: go, golang, http, load-balancer, proxy, proxy-server
- Language: Go
- Homepage:
- Size: 15.6 KB
- Stars: 9
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## WeeProxy
[![Go Report Card](https://goreportcard.com/badge/github.com/abhishekkr/weeproxy)](https://goreportcard.com/report/github.com/abhishekkr/weeproxy)
WeeProxy is a wee bit http proxy to access http services mapped over URL path.
* HTTP Proxy based on URL path mapped to Backends
* round-robin load-balancing
* graceful stop/restart
* prometheus performance metrics at `/metrics`
* configurable header customization
* rate-limiting (same config for all backends)
* circuit breaker (same config for all backends)
#### Quikstart
* start server
```
dep ensurego run weeproxy.go
```* can also be used by downloaded pre-compiled binary from [latest release](https://github.com/abhishekkr/weeproxy/releases/latest), remember to have [sample config](./sample-config.json) in same dir or set required env var
* check http
```
curl localhost:8080/nothingcurl localhost:8080/google
```#### Config
* config to be used can be changed by providing path to `env` var `WEEPROXY_CONFIG`
* proxies based on URL Path maps provided as configuration like, [sample config](./sample-config.json)
```
{
"server": {
"listen-at": ":8080"
},
"url-proxy": {
"/google": "http://www.google.com http://www.google.in",
....more
},
"custom-headers": {
"X-Proxy-By": "WeeProxy" // custom response headers for each response
},
"sanity": {
"max-errors-per-sec": "10", // per backend max errors allowed before ban
"max-request-per-sec": "7000" // per backend max requests allowed before ban
}
}
```> in sample config above, when multiple backends need be load-balanced they are separated by a space
>
> if any other character gets used as separator, env `WEEPROXY_LB_SEPARATOR` need be set with same* port to listen at can be modified updating `listen-at` field in above config
---
#### ToDo
* better no-backend handling
* runtime authenticated config updates over admin api
* rate-limiting (per backend config)
* circuit breaker (per backend config)
---