ccbikai
V2EX  ›  问与答

网站被 endlesscolleges 反代是什么情况?

  •  
  •   ccbikai ·
    PRO
    · Jun 3, 2014 · 2799 views
    This topic created in 4423 days ago, the information mentioned may be changed or developed.
    2 replies    2014-06-05 16:17:31 +08:00
    yanwen
        1
    yanwen  
       Jun 3, 2014
    nginx搜索 禁止反代。

    PS:可以问问 @livid v2ex 是如何禁止别人反代的。。哈哈。。
    cppgohan
        2
    cppgohan  
       Jun 5, 2014
    我挺好奇这个网站的实现的, 镜像了许多站点.

    v2ex也被他镜像(反代)了: http://v2ex.endlesscolleges.com/t/115631
    不过v2ex有一个简单防止反代的函数, (但是如果这个endlesscolleges.com的子域名改成v2ex.com.endlesscolleges.com, 那么这个保护也会失效哈)

    function protectTraffic() {
    var l = top.location.href;
    if ((l.indexOf("v2ex.com") == -1) && (l.indexOf("localhost:") == -1) && (l.indexOf("192.168") == -1)) {
    location.href = 'http://www.v2ex.com/';
    }
    }
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3701 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 04:40 · PVG 12:40 · LAX 21:40 · JFK 00:40
    ♥ Do have faith in what you're doing.