diff --git a/README.md b/README.md index abd3407..499536d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,19 @@ # proxy-loadbalancer -A round-robin load balancer for HTTP proxies. \ No newline at end of file +_A round-robin load balancer for HTTP proxies._ + +This is a simple load balancer using [proxy.py](https://github.com/abhinavsingh/proxy.py) that will route requests to a +cluster of proxy backends in a round-robin fashion. This makes it easy to connect your clients to a large number of +proxy +servers without worrying about implementing anything special clientside. + +## Install + +1. `pip install -r requirements.txt` +2. Copy `proxy-skeleton/app/config.py.example` to `proxy-skeleton/app/config.py` and fill in your config details. +3. Deploy the `./canihazip` and start the server. + +## Use + +To start the load balancer server, navigate to `./proxy-skeleton` and run `python3 -m app`. The systemd service +`loadbalancer.service` is provided as a service example. \ No newline at end of file diff --git a/proxy-skeleton/app/config.py.example b/proxy-skeleton/app/config.py.example index 6b0a544..b5ab390 100644 --- a/proxy-skeleton/app/config.py.example +++ b/proxy-skeleton/app/config.py.example @@ -1,15 +1,19 @@ +# The address of the service used by the IP address of each proxy. IP_CHECKER = 'http://[your IP or domain name]:5000' +# How many threads to use when checking proxy health. MAX_PROXY_CHECKERS = 50 -SMARTPROXY_USER = 'example' -SMARTPROXY_PASS = 'password' - PROXY_POOL = [ "127.0.0.1:3128", "[other server]:3128", ] +# Your login for SmartProxy. Ignore if you aren't using the service. +SMARTPROXY_USER = 'example' +SMARTPROXY_PASS = 'password' + +# The domains that SmartProxy gives you to connect to their service. Leave the array empty to disable this feature. SMARTPROXY_POOL = [ # "dc.smartproxy.com:10001", # ...