Coder Social home page Coder Social logo

gc-ddns's Introduction

gc-ddns

Dynamic DNS API Service for Google Cloud

This is a hub service to connect dynamic IP address endpoint as a home network at any time. Your DNS record on Google Cloud is updated by posting this service from Home PC periodically.

Environment

Node.js 4.3 or Later

Configuration

Edit config/local.yml

config:
  app:
    apiKey: <API service key>
  googleCloud:
    project: <project name>
    authKeyJsonFile: <auth json file path>
    dns:
      zone: <zone name>
      domain: <domain>
  • authKeyJsonFile is provided by authentication page at Google Cloud Console.

Setup and Start API service

$ git clone [email protected]:tilfin/gc-ddns.git
$ cd gc-ddns
$ npm install
$ node app.js

How to update A/AAAA record

Linux/OS X

$ curl -X POST \
    -d 'host=<Host name>&ip=<IP Address>&key=<API service key>&ttl=<TTL>' \
    http://localhost:8080/records

Windows PowerShell

PS > Invoke-RestMethod http://localhost:8080/records `
    -Method POST `
    -Body "host=<Host name>&ip=<IP Address>&key=<API service key>&ttl=<TTL>" `
  • Service port is config.app.port (default 8080)
  • Default TTL is config.ttl
  • Specify request source host IP address if ip is not specified
  • Recommend to access API Service via HTTPS (using nginx as a reverse proxy)

gc-ddns's People

Contributors

tilfin avatar

Stargazers

 avatar  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.