替换上你的 API Token,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。
获得 domain_id 可以用 curl
curl -k https://dnsapi.cn/Domain.List -d "login_token=TOKEN"`| #! /usr/bin/env python | |
| #coding=utf-8 | |
| #----config part---- | |
| INIT_CMDS = ["iptables -F",#clean all | |
| "iptables -X", | |
| "iptables -t nat -F", | |
| "iptables -t nat -X", | |
| "iptables -P INPUT DROP",#forbid all | |
| "iptables -A INPUT -i lo -j ACCEPT"#accept all localhost |
| #!/usr/bin/env python | |
| # coding: utf-8 | |
| class AttrDict(object): | |
| def __init__(self, init=None): | |
| if init is not None: | |
| self.__dict__.update(init) | |
| def __getitem__(self, key): | |
| return self.__dict__[key] |
| #!/usr/bin/env python | |
| import sys | |
| import time | |
| from flask import Flask | |
| from PyQt4 import QtCore, QtGui, QtWebKit | |
| import gevent.wsgi |
替换上你的 API Token,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。
获得 domain_id 可以用 curl
curl -k https://dnsapi.cn/Domain.List -d "login_token=TOKEN"`| // | |
| // Regular Expression for URL validation | |
| // | |
| // Author: Diego Perini | |
| // Created: 2010/12/05 | |
| // Updated: 2018/09/12 | |
| // License: MIT | |
| // | |
| // Copyright (c) 2010-2018 Diego Perini (http://www.iport.it) | |
| // |