Giter Site home page Giter Site logo

aliyun_ddns's People

Contributors

androidol avatar shanzhoupeng avatar xas-712 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

aliyun_ddns's Issues

请教一下这个报错是什么原因

root@whome:/opt/DDNS-master/src# python3 DDNS.py
{'type': 'A', 'ip': '123.xxx.yyy.zzz'}
失败!原因为
The DNS record does not exist in your account.

你好 我再执行的时候 有上面的报错 请问 是什么原因

ALiddns.py不能使用

1一些小错误 74行myip()后面少了:
2修复1之后提示

“Traceback (most recent call last):
File "ddns.py", line 133, in
add_dns(rc_rr, rc_domain, rc_type, rc_value, rc_ttl) # 添加 DNS 解析记录
File "ddns.py", line 105, in add_dns
return clt.do_action_with_exception(request) # 发送请求内容
File "/home/pi/.local/lib/python2.7/site-packages/aliyunsdkcore/client.py", line 274, in do_action_with_exception
request_id=request_id)
aliyunsdkcore.acs_exception.exceptions.ServerException: HTTP Status: 400 Error:SubDomainInvalid.Value The DNS record is invalid or in the wrong format. RequestID:

换成非sdk版本之后就能正常使用了 不知道为什么

https://wtfismyip.com/text 在SS 下显示的是 SS服务器的

我的树莓派在路由下,运行该脚本 https://wtfismyip.com/text 在SS 下显示的是 SS服务器的IP(采用的大陆白名单,GFWlist 不能满足部分网址加速)。。。
另外在网上看到有人 用以下内容 实现 多个查询地址 随机查询。。。避免多次访问被封
不知道能否改进?PS :非编程专业,仅会一点,还希望大神指教

# 此类的作用是获取本地外网ip
class IP(object):
	def __init__(self):
		from tool import user_agent_list
		self.user_agent_list = user_agent_list
		# 网上找了几个获取ip的接口,为了防止过多的访问接口被封,每次调用随机选择
		self.api_list = [
			'http://www.net.cn/static/customercare/yourip.asp',
			'http://members.3322.org/dyndns/getip',
			'http://www.ip168.com/json.do?view=myipaddress',
			'http://pv.sohu.com/cityjson',
			'http://ip.taobao.com/service/getIpInfo.php?ip=myip',
			'http://2018.ip138.com/ic.asp',
		]
	def ip_query(self):
		# 一直循环,直到成功获取到本地外网ip
		while True:
			url = random.sample(self.api_list, 1)[0]
			headers = random.sample(self.user_agent_list, 1)[0]
			try:
				res = requests.get(url, headers={'User-Agent':headers}, timeout=5)
				encoding = chardet.detect(res.content)['encoding']
				html = res.content.decode(encoding)
				out = re.findall(r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}',html)
				if out != []: return out[0] 
			except Exception as e:
				continue

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.