Giter VIP home page Giter VIP logo

embyddns's Introduction

embyDDNS

embyDDNS is a Docker container based off of the phusion-passenger image that contains a BIND9 server and the necessary API to interact with LetsEncrypt.org to obtain an SSL/TLS certificate for client EmbyServers.

DOES NOT ISSUE CERTIFICATES YET. Currently Let'sEncrypt does not yet have the DNS-01 challenge implemented in the production server. Once it is implemented, this repo will be updated. For now this will only act as a DDNS. Feel free to test it out and leave issues to help me make it more robust.

Useage

Building image (./build.sh):

docker build -t embyddns --rm=true .

Running the container (./run.sh):

docker run -d --net=host -e "DDNS=ddns.host.com" --name EmbyDDNS embyddns

Where -e represents a subdomain with a widely resolvable A name. This must be a sub domain of a host under a TLD. "emby.media" will not work here. It must be "DDNS.emby.media"

There must also be a resolvable nameserver associated with this sub domain witht eh name "ns1". Example: "ns1.ddns.host.com"

API

The API is laid out as follows:

Server Public Key

url={host}:5000/api/v0.1/publickey Type=GET

returns=PEM encoded public key of server (publickeystring)

Register Client's Hostname

url= {host}:5000/api/v0.1/register type=POST

*returns=URL Code, Message 201 = Hostname registered successfully 409 = Hostname already exists. (OK) 400 = Bad Request, Server did not understand, (look at return message)

Update IP address

url= {host}:5000/api/v0.1/update type=POST

*returns=URL Code, Message 201 = Hostname registered successfully 409 = Hostname already exists. (OK) 400 = Bad Request, Server did not understand, (look at return message)

Get Certificate (currently only creates DNS TXT record)

url={host}:5000/api/v0.1/getcert* type=POST

returns base64 encoded certificate in PFX format

POST body format body=JWT with claims encrypted with server public key:

jwk= {'k' : "publickeystring"}
claims = {
    'hostname': "hostname",
    'pubkey': "publickey",
    'alg' : "alg",
    'secret' : "secret",
    'ipaddr' : "ipaddr",
}

Where : "hostname"= String(subdomain of user) "publickey= Base64(DER encoded client public key) "alg"= String('hmac-md5') "secret"= Base64(MD5-HMAC of hostname signed with client's RSA private key) "ipaddr"= String(Public IP address of subdomain trying to register with this DDNS)

embyddns's People

Contributors

dirtyjerz avatar

Watchers

 avatar

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.