Git Product home page Git Product logo

mdns-proxy's Introduction

mDNS proxy

Continuous Integration Source Code Docker Image

This Docker images provides a simple proxy for tunneling requests to mDNS-enabled Docker containers via a single endpoint. This allows bridging regular DNS to mDNS name resolution transparently. The usage of this software may be useful in various situations, eg. using it together with Dnsmasq on macOS (with Docker for Mac) or as an regular entrypoint to a virtual machine or on a remote cloud instance.

A simple example setup requires a virtual machine, some mDNS-enabled containers running inside of it, this software running also inside of the virtual machine and some host entry configurations.

Requirements

  • A dedicated host where some mDNS-enabled containers are running (which will be made available on a single port of the host)

Getting starting

You just need to run it like that, to get a working ruby:

$ docker run -p 80:80 --rm hausgold/mdns-proxy

The binded host port is then linked to the mDNS proxy which will handle requests with various host headers (eg. test.local).

docker-compose usage example

ruby:
  image: hausgold/mdns-proxy
  environment:
    # The default, see "Rebind another external DNS suffix"
    - MDNS_SUFFIX='.local'
    # These root path entries will be upgraded to WebSocket
    # connections transparently. The following list is the default.
    - WEBSOCKET_PATHS='cable|sockjs-node|livereload|ws'
    # Change the maximum upload size per request
    - MAX_UPLOAD_SIZE='20m'
  ports:
    # The port to listen on for requests on the host
    - "80:80"

Rebind another external DNS suffix

You can modify the incomming host names by reconfiguring the MDNS_SUFFIX which defaults to .local. This way you can transparently rebind the host to a different DNS name. Say you have an AWS EC2 instance with some mDNS-enabled containers running and bind an IP to it. Setup an A DNS record for it like example.com and a wildcard to the very same host. Then you set MDNS_SUFFIX='.example.com' here and your can access your mDNS containers like this: app.example.com.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.