Bypass IP filtering 跳過酷我音樂的IP檢測 is a popular music sharing platform in China. Chinese users can enjoy latest and high-quality music on it. However, it exploits some trick to prevent users outside Mainland China from listening music flawlessly. For example, when you visit from a country different from China (Taiwan in my case), you will be redirected to the homepage immediately before you can click the play button and enjoy the relaxing voice. Out of curiousity and my own need, I study a small portion of it source code and find it simple to accomplish such IP filtering, and I also find out a lightweight approach to bypass such restriction.


First, observing the source code of kuwo pages. By default it's not possible to view the source code in the browser due to redirections, so I download the page with curl:


$ curl
//...previous irrelevant codes omitted 省略前面無關的code...
    function checkIp(){
             url : '/yy/PlayCheckIp',
             type : 'get',
             data : "",
             success : function(data){
                 if(data == "{\"stauts\":400}"){
//...some other codes 一些其他code...

Obviously, the site checks your IP and redirect you to their homepage if you're not welcomed. You can visit and see what's in it. The simplest way to escape the awful situation is blocking all traffic to the check point. If the checking request fails, nothing happens. I have done it by adding a custom rule to AdblockPlus. Now I can dive in the ocean of music without annoying redirections!


Other sites have some other tricks to prevent non-China users from watching their videos or listening to their songs. Such examples include and Here are some examples:


There's a project Unblock Youku aiming on such issues. However, is not supported as of now. In fact, there's not need to proxy the traffic of kuwo IP detection. Just block and ignore it.

有個專案Unblock Youku力圖解決這些問題,然而到目前為止酷我還沒被支援。實際上也沒有必要轉送酷我IP檢測的流量。只要阻擋然後忽略就行了。

Among these sites, what uses is the simplest, but maybe it's why there's no discussion about it. I googled PlayCheckIp and got nothing meaningful. I hope this short post can help people outside Mainland China have the same rights to enjoy great music :)

在這些網站裡,酷我用的方法是最簡單的,但這也可能是為何都沒有相關的討論。我在google上搜尋PlayCheckIp沒有得到有用的資訊。我希望這篇文章可以幫助中國大陸以外的使用者也能擁有享受美妙音樂的權利 :)