全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
楼主: dabiantai

cloudflare CNAME接入命令行版

  [复制链接]
发表于 2017-8-31 13:52:44 | 显示全部楼层
dabiantai 发表于 2017-8-31 10:39
等一段时间就好啦,cf好像是排队检查的有一点延迟

源站地址不能填ip?什么意思
发表于 2017-8-31 14:50:15 | 显示全部楼层
大佬们,CF有什么办法被攻击自动开启5妙盾?
发表于 2017-8-31 15:06:26 | 显示全部楼层
scavin 发表于 2017-8-31 13:52
源站地址不能填ip?什么意思

就是填别名啦。CF的CNAME不支持直接解析IP
发表于 2017-8-31 17:21:08 | 显示全部楼层
这个挺好申请的,API也比较简单明了
发表于 2017-8-31 17:37:20 | 显示全部楼层
本帖最后由 hotsnow 于 2017-8-31 17:49 编辑

开通SSL的时候脚本报错,是啥原因?

  1. Traceback (most recent call last):
  2.   File "./cloudflare-partner-cli.py", line 352, in <module>
  3.     getattr(cf, act)(arg)
  4.   File "./cloudflare-partner-cli.py", line 195, in ssl_verfication
  5.     r = self._userapi("/zones?name=%s&match=all" % arg['zone'])
  6.   File "./cloudflare-partner-cli.py", line 163, in _userapi
  7.     r = opener.open(req).read()
  8.   File "/usr/lib/python3.5/urllib/request.py", line 466, in open
  9.     response = self._open(req, data)
  10.   File "/usr/lib/python3.5/urllib/request.py", line 484, in _open
  11.     '_open', req)
  12.   File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
  13.     result = func(*args)
  14.   File "/usr/lib/python3.5/urllib/request.py", line 1297, in https_open
  15.     context=self._context, check_hostname=self._check_hostname)
  16.   File "/usr/lib/python3.5/urllib/request.py", line 1254, in do_open
  17.     h.request(req.get_method(), req.selector, req.data, headers)
  18.   File "/usr/lib/python3.5/http/client.py", line 1107, in request
  19.     self._send_request(method, url, body, headers)
  20.   File "/usr/lib/python3.5/http/client.py", line 1147, in _send_request
  21.     self.putheader(hdr, value)
  22.   File "/usr/lib/python3.5/http/client.py", line 1083, in putheader
  23.     if _is_illegal_header_value(values[i]):
  24. TypeError: expected string or bytes-like object
复制代码


继续尝试,则报下列错误

  1. Traceback (most recent call last):
  2.   File "./cloudflare-partner-cli.py", line 352, in <module>
  3.     getattr(cf, act)(arg)
  4.   File "./cloudflare-partner-cli.py", line 195, in ssl_verfication
  5.     r = self._userapi("/zones?name=%s&match=all" % arg['zone'])
  6.   File "./cloudflare-partner-cli.py", line 163, in _userapi
  7.     r = opener.open(req).read()
  8.   File "/usr/lib/python3.5/urllib/request.py", line 472, in open
  9.     response = meth(req, response)
  10.   File "/usr/lib/python3.5/urllib/request.py", line 582, in http_response
  11.     'http', request, response, code, msg, hdrs)
  12.   File "/usr/lib/python3.5/urllib/request.py", line 510, in error
  13.     return self._call_chain(*args)
  14.   File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
  15.     result = func(*args)
  16.   File "/usr/lib/python3.5/urllib/request.py", line 590, in http_error_default
  17.     raise HTTPError(req.full_url, code, msg, hdrs, fp)
  18. urllib.error.HTTPError: HTTP Error 400: Bad Request
复制代码
发表于 2017-8-31 20:05:57 | 显示全部楼层
开启ssl,一直没有效果。十个小时了。
发表于 2017-8-31 21:19:58 | 显示全部楼层
斜阳晚暮 发表于 2017-8-31 20:05
开启ssl,一直没有效果。十个小时了。

我的选开启SSL虽然一直报错,但是5分钟就自动开启生效了,访问也正常
发表于 2017-8-31 21:27:44 | 显示全部楼层
hotsnow 发表于 2017-8-31 21:19
我的选开启SSL虽然一直报错,但是5分钟就自动开启生效了,访问也正常  ...

开启之后,加一条cname记录是不是就行了。
然后https://访问?
发表于 2017-8-31 21:33:11 | 显示全部楼层
hotsnow 发表于 2017-8-31 21:19
我的选开启SSL虽然一直报错,但是5分钟就自动开启生效了,访问也正常  ...

刚刚看可以了。不知道之前那里原因。
对照了cname记录之前没有解析错误。
发表于 2017-8-31 21:37:44 | 显示全部楼层
斜阳晚暮 发表于 2017-8-31 21:27
开启之后,加一条cname记录是不是就行了。
然后https://访问?

先加 cname,再开启 SSL
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-5-3 06:35 , Processed in 0.059568 second(s), 6 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表