topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday April 18, 2024, 4:07 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: a tiny local URL rewrite engine to help the Chinese watch youtube  (Read 4208 times)

electronixtar

  • Member
  • Joined in 2007
  • **
  • Posts: 141
    • View Profile
    • Donate to Member
Hi DC,

Youtube is blocked in China, but there's a walkaround, set browser's Auto Proxy Config like this:

if (shExpMatch(host, "*.youtube.com"))
{
    return "PROXY www.google.cn:80;";
}

You can view the youtube pages, but no videos. because the border firewall will RST every TCP port 80 request which contains the string ".googlevideo.com" (If you visit mit.edu/?.googlevideo.com, mit.edu will get blocked for couple of minutes), and it will spoof every DNS request of *.googlevideo.com to some non-exist IP address.

Now if there's a local URL rewrite change could change
http://v3.lscache7.googlevideo.com/videoplayback?xxxxxx
to
http://74.125.170.150/videoplayback?xxxxxx

it will work.

SO what I need is a tiny, local URL rewrite proxy engine that could do the job above, and using PAC like following

if (shExpMatch(host, "*.youtube.com"))
{
    return "PROXY www.google.cn:80;";
}
if (shExpMatch(host, "*.googlevideo.com"))
{
    return "PROXY localhost:3333;";
}

Everyone can view youtube.

There's another usage, for every Google.com search result, the cached function won't work, but if you change the URL
http://74.125.155.132/search?q=cache:ucajK2mTlHwJ:www.xxx.com
to
http://74.125.155.132/search?by=DonationCoder&q=cache:ucajK2mTlHwJ:www.xxx.com

The page will load, because GFW only blocks URL contains the keyword "search?q=cache:"

I hope the program is compiled standalone, has a tray icon, scans a regex config file (live update running config everytime the file changes), then 302 redirect match HTTP request.
« Last Edit: July 14, 2009, 06:52 AM by electronixtar »