michiel / docker-http-cidr-proxy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Variables

Name Default Description
LISTENER_PORT 8088 Port to receive connections on
UPSTREAM_PORT 80 Port to connect upstream
ADMIN_PORT 8001 Port to run envoy admin UI on
UPSTREAM_CIDR None CIDR range to configure for upstream
UPSTREAM_LB_POLICY round_robin REQUIRED - Valid envoy load-balancing policy (round_robin, random, etc)
UPSTREAM_CONNECT_TIMEOUT 0.1s Upstream timeout
UPSTREAM_SET_TLS None Set to true to enable TLS context creation
TLS_CRT_FILE None Location of CRT file
TLS_KEY_FILE None Location of KEY file
DEBUG None Set to true to dump generated config to STDOUT

Example

docker build .
docker run -p 8001:8001 --env UPSTREAM_CIDR=192.168.0.0/28 cidrproxy:latest

LISTENER_PORT is 8088
UPSTREAM_PORT is 80
ADMIN_PORT is 8001
Using template /tools/front-envoy.yaml
Output to file /tmp/front-envoy.yaml
UPSTREAM_CIDR is set to '192.168.0.0/28'
UPSTREAM_CIDR will expand to 16 addresses :
     192.168.0.0
     192.168.0.1
     192.168.0.2
     192.168.0.3
     192.168.0.4
     192.168.0.5
     192.168.0.6
     192.168.0.7
     192.168.0.8
     192.168.0.9
     192.168.0.10
     192.168.0.11
     192.168.0.12
     192.168.0.13
     192.168.0.14
     192.168.0.15
[2018-10-25 11:07:52.050][204][info][main] source/server/server.cc:202] initializing epoch 

Open http://localhost:8001 for admin UI

docker run -p 8001:8001 --env UPSTREAM_CIDR=192.168.0.0/28 --env DEBUG=true --env UPSTREAM_SET_TLS=true --env TLS_CRT_FILE=/secrets/chain.crt --env TLS_KEY_FILE=/secrets/private.key cidrproxy:latest

About


Languages

Language:Shell 93.3%Language:Dockerfile 6.7%