V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
jacy
V2EX  ›  分享创造

给大家测试一个自己搭建的 dns

  •  1
     
  •   jacy · 2014-06-18 12:52:54 +08:00 · 4788 次点击
    这是一个创建于 3818 天前的主题,其中的信息可能已经有所发展或是发生改变。
    特点:可直接上部分被和谐网站,其他网站无dns污染,
    目前可直连谷歌全套服务,twiiter,facebook,如需更多,可以联系我

    已知问题:
    1.虽然像是直连免翻,其实还是通过了我美国的一个vps,且是匿名的,所以登录上述网站可能会提示登录地点异常。
    2.vps流量有限,googlevideo.com域名流量不通过我的服务器,但是这个域名没污染,有时可以看youtube视频。如需稳定youtube,还是用自己的翻墙方法吧。
    3.如果手机用我的dns,大部分手机上的谷歌app不能正常使用,因为没去抓包,原因还不知道。
    4.由于个人原因以及外界不可抗拒的原因(你懂的),此服务不保证可靠性,如果不可用了,记得换回dns。

    测试说明:
    目前先发放十个测试名额,我看看vps承受能力怎样,可以的话再多发一些。需要的在底下留下邮箱,发送的dns地址仅供个人使用,请勿传播。有问题可以直接再此贴回复。

    原理说明:
    经我上一个求助帖的启发,在国外vps上搭建了sniproxy,发现可以转发所有域名的http和https流量,然后我在国内的vps上搭建个dns,把一些域名解析到国外的vps即可。sniproxy项目地址: https://github.com/dlundquist/sniproxy,有条件的可以自己搭建个试试。
    第 1 条附言  ·  2014-06-18 17:36:32 +08:00
    已经有12人接受测试,我先观察一下负载情况,暂不接受更多人了。
    43 条回复    2014-07-12 17:19:12 +08:00
    vainly
        1
    vainly  
       2014-06-18 13:10:24 +08:00
    sticver#gmail.com
    wanwan
        2
    wanwan  
       2014-06-18 14:07:13 +08:00
    momoxiao520#qq.com
    tnx2014
        3
    tnx2014  
       2014-06-18 15:42:06 +08:00
    lqyxj361#gmail.com
    Love4Taylor
        4
    Love4Taylor  
       2014-06-18 15:44:39 +08:00
    love4taylor#outlook.com
    yanwen
        5
    yanwen  
       2014-06-18 15:54:24 +08:00
    y4nwen#gmail.com 谢谢
    free4537
        6
    free4537  
       2014-06-18 15:56:01 +08:00
    free4537#foxmail.com
    angusjune
        7
    angusjune  
       2014-06-18 15:58:13 +08:00
    angus.is.online#gmail.com Thx!
    dangge
        8
    dangge  
       2014-06-18 15:58:27 +08:00
    kstsca
        9
    kstsca  
       2014-06-18 16:06:40 +08:00
    kstsca##163.com
    83f420984
        10
    83f420984  
       2014-06-18 16:07:22 +08:00
    xmit0806#qq.com
    kokdemo
        11
    kokdemo  
       2014-06-18 16:10:34 +08:00
    kokdemo#163.com thx
    0400295
        12
    0400295  
       2014-06-18 17:05:56 +08:00
    chuck19861015#gmail.com.Thank U
    jacy
        13
    jacy  
    OP
       2014-06-18 17:34:44 +08:00   ❤️ 1
    qoooop
        14
    qoooop  
       2014-06-18 17:48:50 +08:00
    又来晚了 qoooop#vip.qq.com
    free4537
        15
    free4537  
       2014-06-18 17:57:01 +08:00
    试了下,ping 平均 10ms,用后可直接访问 Google,Twitter 等。牛掰~
    loyd1234
        16
    loyd1234  
       2014-06-18 18:47:55 +08:00
    我不想打酱油,[email protected]
    tnx2014
        17
    tnx2014  
       2014-06-18 18:57:22 +08:00
    @jacy 已收到 先感谢再用。
    kokdemo
        18
    kokdemo  
       2014-06-18 21:19:12 +08:00
    @jacy 经测试twiiter效果不错,facebook好像上不去……
    jacy
        19
    jacy  
    OP
       2014-06-18 21:20:33 +08:00
    @kokdemo facebook我测试正常额,你是不是没用https,http有时会被重置。
    kokdemo
        20
    kokdemo  
       2014-06-18 22:08:51 +08:00
    @jacy ……确实是没用https……
    tnx2014
        21
    tnx2014  
       2014-06-18 22:13:41 +08:00
    单独用非常有效。在路由器上用就不行,也许是我Tomato系统的问题。只能继续使用SS方案。
    zjgood
        22
    zjgood  
       2014-06-18 22:16:36 +08:00 via Android
    @free4537 真的吗?那这个东东的价值岂不是可堪shadowsocks咯?楼主大才!
    tnx2014
        23
    tnx2014  
       2014-06-18 22:40:12 +08:00
    @zjgood 推特、脸书、谷歌服务可以直接连接,不同的放速度也不用同,我这是50毫秒左右。youtube只能打开,不能播放,,也许某些视频能放吧,和只改Hosts的效果基本一致。
    tnx2014
        24
    tnx2014  
       2014-06-18 22:49:28 +08:00
    如果不看U2B的话,这个还是很值得推荐的,楼主确实有功啊。
    zjgood
        25
    zjgood  
       2014-06-19 00:02:41 +08:00
    @jacy 楼主能否发一下你的sniproxy配置呢~~~
    jacy
        26
    jacy  
    OP
       2014-06-19 11:08:57 +08:00   ❤️ 1
    @zjgood 如果vps上只需要转发功能,没装其他web服务器的话直接监听80和443就行了,然后规则里直接正则转发所有流量,像这样:
    user nobody
    listen 80 {
    proto http
    table http_hosts
    }
    listen 443 {
    proto tls
    table https_hosts
    }
    table http_hosts {
    .* *:80
    }
    table https_hosts {
    .* *:443
    }
    zjgood
        27
    zjgood  
       2014-06-19 12:23:39 +08:00 via Android
    @jacy 但是如果装了nginx怎么破呢?
    jacy
        28
    jacy  
    OP
       2014-06-19 12:36:24 +08:00
    @zjgood 如果vps是多ip就在listen后面写上一个nginx不用的ip,如果是单ip的话,而且nginx没监听443,那么sni就只监听443,80就用nginx反向代理吧。
    zjgood
        29
    zjgood  
       2014-06-19 12:39:35 +08:00 via Android
    @jacy 只好暂时割了。。。
    单买Linode拿来做sniproxy感觉还是挺浪费的
    jacy
        30
    jacy  
    OP
       2014-06-19 12:58:53 +08:00
    @zjgood 我已经在另外一台双ip的vps上测试成功了,nginx只listen一个ip,另外一个ip给sni,两者都工作正常。发现sni不怎么占用内存和负载,性能很好,就是用得人多了流量花花的流,vps给的流量不多啊。
    还想到一个单ip解决方案,就是nginx不监听80和443,换成其他端口,然后sni用正则匹配,发现是你nginx监听的域名,就转发到nginx的端口。
    loser
        31
    loser  
       2014-06-19 13:03:14 +08:00
    求方法,我也有那么多vps啊
    loser
        32
    loser  
       2014-06-19 13:03:33 +08:00
    看到方法了,感谢!!
    JasperYanky
        33
    JasperYanky  
       2014-06-19 16:48:46 +08:00
    jasperyanky#gmail.com 感谢
    NEX
        34
    NEX  
       2014-06-19 19:03:28 +08:00
    jacy
        35
    jacy  
    OP
       2014-06-19 21:46:45 +08:00
    @NEX
    @JasperYanky
    @loyd1234
    @qoooop
    已发送地址到邮箱
    zjgood
        36
    zjgood  
       2014-06-19 23:49:10 +08:00
    @jacy nginx反向代理sniproxy成功
    感谢提供思路。
    首先sniproxy监听127.0.0.1:81
    然后nginx配置如下:
    server {
    listen 80 default_server;
    location / {
    proxy_redirect off;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass http://127.0.0.1:81;
    }
    }
    SNGR
        37
    SNGR  
       2014-06-20 14:21:26 +08:00
    运行 ./autogen.sh 出行一堆

    [root@108 sniproxy-master]# ./autogen.sh
    configure.ac:16: warning: AC_LIB_PREPARE_PREFIX is m4_require'd but not m4_defun'd
    m4/lib-link.m4:57: AC_LIB_HAVE_LINKFLAGS is expanded from...
    /usr/share/aclocal/pkg.m4:102: PKG_CHECK_MODULES is expanded from...
    configure.ac:16: the top level
    configure.ac:16: warning: AC_LIB_PROG_LD is m4_require'd but not m4_defun'd
    m4/lib-link.m4:125: AC_LIB_RPATH is expanded from...
    configure.ac:16: warning: AC_LIB_PREPARE_MULTILIB is m4_require'd but not m4_defun'd
    m4/lib-link.m4:181: AC_LIB_LINKFLAGS_BODY is expanded from...
    configure.ac:27: warning: AC_LIB_PREPARE_PREFIX is m4_require'd but not m4_defun'd
    configure.ac:27: the top level
    configure.ac:27: warning: AC_LIB_PREPARE_MULTILIB is m4_require'd but not m4_defun'd
    configure.ac:44: warning: AC_LIB_PREPARE_PREFIX is m4_require'd but not m4_defun'd
    ../../lib/m4sugar/m4sh.m4:505: AS_IF is expanded from...
    configure.ac:44: the top level
    configure.ac:44: warning: AC_LIB_PREPARE_MULTILIB is m4_require'd but not m4_defun'd
    configure.ac:51: warning: AC_LIB_PREPARE_PREFIX is m4_require'd but not m4_defun'd
    configure.ac:51: the top level
    configure.ac:51: warning: AC_LIB_PREPARE_MULTILIB is m4_require'd but not m4_defun'd
    configure.ac:16: warning: AC_LIB_PREPARE_PREFIX is m4_require'd but not m4_defun'd
    m4/lib-link.m4:57: AC_LIB_HAVE_LINKFLAGS is expanded from...
    aclocal.m4:123: PKG_CHECK_MODULES is expanded from...
    configure.ac:16: the top level
    configure.ac:16: warning: AC_LIB_PROG_LD is m4_require'd but not m4_defun'd
    m4/lib-link.m4:125: AC_LIB_RPATH is expanded from...
    configure.ac:16: warning: AC_LIB_PREPARE_MULTILIB is m4_require'd but not m4_defun'd
    m4/lib-link.m4:181: AC_LIB_LINKFLAGS_BODY is expanded from...
    configure.ac:27: warning: AC_LIB_PREPARE_PREFIX is m4_require'd but not m4_defun'd
    configure.ac:27: the top level
    configure.ac:27: warning: AC_LIB_PREPARE_MULTILIB is m4_require'd but not m4_defun'd
    configure.ac:44: warning: AC_LIB_PREPARE_PREFIX is m4_require'd but not m4_defun'd
    ../../lib/m4sugar/m4sh.m4:505: AS_IF is expanded from...
    configure.ac:44: the top level
    configure.ac:44: warning: AC_LIB_PREPARE_MULTILIB is m4_require'd but not m4_defun'd
    configure.ac:51: warning: AC_LIB_PREPARE_PREFIX is m4_require'd but not m4_defun'd
    configure.ac:51: the top level
    configure.ac:51: warning: AC_LIB_PREPARE_MULTILIB is m4_require'd but not m4_defun'd
    configure.ac:16: warning: AC_LIB_PREPARE_PREFIX is m4_require'd but not m4_defun'd
    m4/lib-link.m4:57: AC_LIB_HAVE_LINKFLAGS is expanded from...
    aclocal.m4:123: PKG_CHECK_MODULES is expanded from...
    configure.ac:16: the top level
    configure.ac:16: warning: AC_LIB_PROG_LD is m4_require'd but not m4_defun'd
    m4/lib-link.m4:125: AC_LIB_RPATH is expanded from...
    configure.ac:16: warning: AC_LIB_PREPARE_MULTILIB is m4_require'd but not m4_defun'd
    m4/lib-link.m4:181: AC_LIB_LINKFLAGS_BODY is expanded from...
    configure.ac:27: warning: AC_LIB_PREPARE_PREFIX is m4_require'd but not m4_defun'd
    configure.ac:27: the top level
    configure.ac:27: warning: AC_LIB_PREPARE_MULTILIB is m4_require'd but not m4_defun'd
    configure.ac:44: warning: AC_LIB_PREPARE_PREFIX is m4_require'd but not m4_defun'd
    ../../lib/m4sugar/m4sh.m4:505: AS_IF is expanded from...
    configure.ac:44: the top level
    configure.ac:44: warning: AC_LIB_PREPARE_MULTILIB is m4_require'd but not m4_defun'd
    configure.ac:51: warning: AC_LIB_PREPARE_PREFIX is m4_require'd but not m4_defun'd
    configure.ac:51: the top level
    configure.ac:51: warning: AC_LIB_PREPARE_MULTILIB is m4_require'd but not m4_defun'd
    configure:4006: error: possibly undefined macro: AC_LIB_PREPARE_PREFIX
    If this token and others are legitimate, please use m4_pattern_allow.
    See the Autoconf documentation.
    configure:4007: error: possibly undefined macro: AC_LIB_PROG_LD
    configure:4125: error: possibly undefined macro: AC_LIB_PREPARE_MULTILIB
    configure:4200: error: possibly undefined macro: AC_LIB_WITH_FINAL_PREFIX
    autoreconf: /usr/bin/autoconf failed with exit status: 1
    jacy
        38
    jacy  
    OP
       2014-06-20 17:44:53 +08:00 via Android
    @SNGR 你是centos吗?我用CentOS也这样,后面无奈换成Debian了。
    SNGR
        39
    SNGR  
       2014-06-20 19:29:39 +08:00
    @jacy 是centos,额,无解么?放狗半天没效果。
    jacy
        40
    jacy  
    OP
       2014-06-20 23:08:46 +08:00
    @SNGR 我也不太熟悉linux编译软件,这个项目作者就没给centos的方法,没办法
    SNGR
        41
    SNGR  
       2014-06-21 14:10:36 +08:00
    @jacy 折腾半天还是没有安装成功,运行时提示
    ./sniproxy
    2014-06-21 06:08:10 Only socket address backends are permitted when compiled without libudns
    2014-06-21 06:08:10 error parsing /etc/sniproxy.conf at 707 near:
    2014-06-21 06:08:10 708 .*\\.com *:443

    是配置文件的问题么?求配置·····
    jacy
        42
    jacy  
    OP
       2014-06-21 18:21:11 +08:00
    @SNGR 参见26楼。
    可以把你的配置文件发上来看看。另外装上libudns试试。
    soullab
        43
    soullab  
       2014-07-12 17:19:12 +08:00
    感谢提供思路,已经成功。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2880 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 06:44 · PVG 14:44 · LAX 22:44 · JFK 01:44
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.