Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us

avatar image

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

Login with username, password and session length
  • December 16, 2017, 06:42 PM
  • Proudly celebrating 10 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 2846 times)


  • 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

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

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 »