Giter Club home page Giter Club logo

gitdyndns's Introduction

Gitdyndns

The idea is to use a git repository as DDNS provider.

Scenario - OpenVPN

Use gitdyndns.push on your server (e.g. VPN server in your LAN at home). For example define a cron job that will update the git repo (and push) every 12h.

Use gitdyndns.pull on your laptop to fetch the latest commits (changes) from your git repo - which has been updated by the server. Use the output of gitdyndns.pull as an input for the openvpn command.

Installation

$ gem install gitdyndns

Usage

  • create a remote git repo (e.g. bitbucket or gist)
  • clone it to your server and laptop
  • make sure that the server can commit to the repo (SSH key)
  • set your configuration
  • set your cron job

Configuration for push and pull

gitdyndns configuration can either be done in a config file or via environment variables (in that order).

Configuration file. Put a config file .gitdyndns.yaml in your home, e.g. ~/.gitdyndns.yaml. The file expects two values:

lan_name: my_network
repo_path: /home/username/my_gitddns_repo

Configuration environment variable Instead of using the config file, export two env vars in your login shell.

epxort GITDYNDNS_LAN_NAME="my_network"
export GITDYNDNS_REPO_PATH="/home/username/my_gitddns_repo"

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

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.