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

现有版本有没有什么办法能和gogaent打配合??? #5

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

Comments

@GoogleCodeExporter
Copy link
Contributor

测试了几个地址 和goagent返回的结果还是有出入。 
当然远程都是8.8.8.8

特别想能与goagent提供的DNS服务搭配

把Zdns作为智能切换 类似SwitchySharp 或autoproxy的切换功能

但是做了如下尝试后以失败告终

首先编辑goagent的配置文件 改为如下

[dns]
enable = 1
listen = 127.0.0.1:54[或者其他端口]
remote = 8.8.8.8
cachesize = 5000
timeout = 2

再在Zdns的dns.conf写入
Foreign_DNS 127.0.0.1:54

没测试 估计不行。。

所以索性改.PY

class DNSProxyHandler_ByTCP(StreamRequestHandler):
    def handle(self):
        data = self.connection.recv(1024)
        s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
        s.connect(("8.8.8.8",53)) [此处改为s.connect(("127.0.0.1",54))]
        s.send(data)
        r_data = s.recv(1024)
        self.wfile.write(r_data)
        s.close()


做了以上尝试后失败告终 所以只能求指教了。。

确实不知道现在版本能否这样使用 
但是改一下估计也不会特别的麻烦

或者是加入另一个本地DNS选择 可以任意启用其中2个实现切换

还想问问以后是否有朝着这方面发展的打算 
就是作为本地的一个高级DNS智能切换~~ 其他的不管

Original issue reported on code.google.com by [email protected] on 7 Jan 2013 at 5:32

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