Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

技术问题咨询下! #4

Open
GoogleCodeExporter opened this issue Aug 23, 2015 · 4 comments
Open

技术问题咨询下! #4

GoogleCodeExporter opened this issue Aug 23, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link
Contributor

你好,
就是在程序什么地方可以判断域名的CNAME 
地址,因为最近有个项目需要判断域名的CNAME 
数据,然后,针对性返回特定Ip地址。
请指导下。谢谢

我已经在G+1上你给留言了。

Original issue reported on code.google.com by [email protected] on 3 Nov 2012 at 12:56

@GoogleCodeExporter
Copy link
Contributor Author

你是指
;; ANSWER SECTION:
vod34.c13.lixian.vip.xunlei.com. 1771 IN CNAME  c05063.sandai.net.
c05063.sandai.net.      1771    IN      A       124.95.156.64
像这样的CNAME吗?
这个 需要解析返回的包,我这个脚本里面没做这些
但是我试着用C语言写的那个版本有解析,应该可以
那个C版没发到code上来是因为写的太烂了,C功底不扎实,写��
�来自己看着都恶心

抱歉,这些天一直没看Google code,给你回复晚了。。。

Original comment by [email protected] on 19 Nov 2012 at 6:16

@GoogleCodeExporter
Copy link
Contributor Author

客气了。不知道,linux 下与 windows 下python 
的目录路径有什么不一样。

Original comment by [email protected] on 20 Nov 2012 at 2:19

@GoogleCodeExporter
Copy link
Contributor Author

PY文件里面
DNS_CONFIG_FILE = 'dns.conf'
DNS_HOSTS_FILE = 'dns.hosts'
DNS_SWITCH_FILE = 'dns.switch'
DNS_LOCAL_PATH = '.\\'
这里是按照win环境写的,在Linux下不行的

这个脚本效率很差的,如果你是要在项目中使用,会非常糟��
�

推荐你使用dnsmasq

Original comment by [email protected] on 21 Nov 2012 at 6:40

@GoogleCodeExporter
Copy link
Contributor Author

可以给你email吗,有个问题想咨询一下。

Original comment by [email protected] on 28 Sep 2014 at 3:16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant