Code Monkey home page Code Monkey logo

ddns-for-nodejs's Introduction

DDNS For NodeJs

GIT仓库

引言

DDNS For NodeJs 是使用nodejs实现的DDNS的工具,通过腾讯云API实现的动态域名解析。 解决在一些情况下IP地址不停更换的问题。

适用

  • 家庭宽带的ip变化

准备

  • 安装NODEJS
  • 安装pm2
  • 腾讯云的域名

配置文件

//config.js
module.exports = {
    SecretId:"",
    SecretKey:"",
    SignatureMethod:"HmacSHA256", //只支持HmacSHA256与HmacSHA1
    domain:"", //域名 eg:test.com
    subDomain:"",//子域名 eg:web
    recordType:"A",
    recordLine:"默认",
    network:"ppp0" //表示网卡的名称,ppp0表示linux宽带拨号默认虚拟网卡
}

启动DDNS

git clone https://github.com/holleworldabc/ddns-for-nodejs.git
cd ddns-for-nodejs
pm2 start app.js --name DDNS

停止DDNS

pm2 stop DDNS

开机自启

pm2 save
pm2 startup

结束

有问题可以回复。

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.