Skip to content

lexysoda/goreverse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goreverse

Automatically detect running docker containers and redirect http traffic to them depending on the url.

I have a pi that runs pihole and other non-public services. I want to set nice names for these services in the pihole dns and just start docker containers. I guess jwilder/nginx-proxy does something similar, although I haven't really looked at it.

idea

  • search all running containers for the tag goreverse and parse the value as a url
  • get the public port that is mapped to private port 80
  • proxy requests sent to the public port 80 of the machine to the private port of the matching container
  • profit

notes

  • the resolved url is set in the host header
  • nginx
  • reverse proxy already sets X-Forwarded-For
  • Ealenn/Echo-Server is nice for manual testing: docker run --rm -p 80 -l goreverse=http://kek.com -d ealen/echo-server

todo

  • accept https and terminate ssl
  • listen on docker event channel and update on demand
  • tests lul

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages