Sign inSign up

davinci1976/docker-sni-proxy

By davinci1976

Updated about 8 years ago

proxy http and https requests to the appropriate container/service

Image
1

1.1K

davinci1976/docker-sni-proxy repository overview

docker-sni-proxy

Simplistic reverse proxy to route HTTPS(443) and HTTP(80) connection to actual dockers

How to use

CLI / Environment options

Usage of ./docker-sni-proxy:
  -docker-network string
    	Specify the public network for docker
  -host string
    	Specify the interface to listen to. (default "0.0.0.0")
  -http-port int
    	Specify the port to listen to. (default 80)
  -mode string
    	Specify the mode : stack, service (default "stack")
  -tls-port int
    	Specify the port to listen to. (default 443)

Use cases

With stack network within a unique compose/swarm stack, manual network assignment
With external public network, with multiple compose/swarm stacks, manual network assignment
  • Use preferably MODE=stack mode
  • Add public service to external public network
With external public network, with multiple compose/swarm stacks, automatic network assignment

Modes

Service mode
  • Integrate docker-sni-proxy within your services with MODE=service (see docker-compose.test.yml)
  • To call a service , use ., docker-sni-proxy will call
Stack mode
  • Integrate docker-sni-proxy in a dedicated stack with MODE=stack
  • manual : Ensure all other public service are linked to that public network <public-network-name>
  • automatic : use DOCKER_NETWORK=<public-network-name> (see docker-compose.yml)
  • To call a service within the stack , use .., docker-sni-proxy will call STACK_SERVICE

Changelog

  • 0.3.1
    • fix a panic on buffer overflow in GetSNBlock:93 (forgery attack)
  • 0.3.0
    • add support for docker swarm mode service
  • 0.2.0
    • add docker support : docker-network=public for the proxy, labels: proxy=true for containers/services
    • add docker internal port mapping support for http (80): labels: proxy-http-port=<port>
    • add docker internal port mapping support for tls/sni (443): labels: proxy-tls-port=<port>
  • 0.0.3
    • Fix HTTP header Host parsing
  • 0.0.2
    • Add support to HTTP on port 80
    • Add mode service. default remains stack
  • 0.0.1
    • Basic support of SNI on port 443

Tag summary

Content type

Image

Digest

Size

4.3 MB

Last updated

about 8 years ago

docker pull davinci1976/docker-sni-proxy