Home > General, GTFS, PHP, PlayStation3 > Got a PS3? Want Hulu Back? Easy enough…

Got a PS3? Want Hulu Back? Easy enough…

June 29th, 2009

Update Jan 6, 2010: Some users are reporting that they’re getting an error telling them they need to update Flash. I imagine we’re going to have to wait for Sony to update the PS3 firmware with a new Flash version.


Over the weekend Hulu stopped working for PS3 users. How did they block the PS3 users? With the dumbest method they could find. They test the User-Agent string in the HTTP request. Well, luckily, we can use a proxy server and just rewrite it. Windows users may want to look here

1. Install squid (“sudo apt-get install squid” for ubuntu users…. for Windows users, google for: squid windows)

2. Edit squid’s default config (/etc/squid/squid.conf on ubuntu) with these changes (or download my configuration: squid-hulu.conf):

Search for “acl localnet src” and set it to your internal network. You can remove the other localnet definitions if you’re not using them as shown here:

#acl localnet src 10.0.0.0/8
#acl localnet src 172.16.0.0/12
acl localnet src 192.168.0.0/16

Note: For 99.9999% of you, the correct line will be “acl localnet src 192.168.0.0/16″

After the “acl localnet src” line, add this:

acl hulu url_regex -i ^http://.*.hulu.com/.*

Search for “http_access allow localhost” and add “http_access allow localnet” as such:

http_access allow localnet
http_access allow localhost

Add the following two lines pretty much anywhere in the file (the end of the file works just fine):

header_access User-Agent deny hulu
header_replace User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729)

3. Start squid (sudo /etc/init.d/squid start)

4. Go to PS3 Internet settings. Do manual configure. Go through the settings as normal (the defaults should be fine) until you get to proxy server. Set it to be your PC’s IP address port 3128.

Your PS3 is now a Windows machine running Firefox (as far as Hulu is concerned) and you can use Hulu again. What a dumb method of restricting access.

UPDATE – Jul 30 2009: To all of you guys out there saying “Why don’t you just use PlayOn or TVersity?” My response is:



from eric to MediaMall Support
date Mon, Jun 29, 2009 at 10:00 AM

I assume you're saying that there's no plan for a Linux version then?

from MediaMall Support to eric
date Mon, Jun 29, 2009 at 10:03 AM

Correct.


That was the response I received. TVersity is quite obviously intertwined with Windows and there is no hope there either. The users that support the invasive DRM (by using it) are responsible for open protocols not being available. If you want to know why DRM is successful, you need only look in the mirror.

UPDATED – Aug 10 2009: As requested in the comments, the instructions now make it so that only hulu will get the header replaced. Also, the comments section has tips and hints for Windows users and squid version 3.0+. See:

Some more Windows Info

Squid 3.0+ Info

General, GTFS, PHP, PlayStation3 , , ,

  1. Nael
    June 30th, 2009 at 02:29 | #1

    Thanks will try this out.

  2. Nikolaus
    June 30th, 2009 at 15:12 | #2

    Does this solution require my PC/Laptop to be always running in order for my PS3 to play Hulu?

  3. June 30th, 2009 at 15:15 | #3

    Yes. All traffic will get routed through your PC if you do this.

  4. Nikolaus
    June 30th, 2009 at 15:24 | #4

    @eric
    Oh man!!! I already have PlayOn and just really liked I didn’t have to run my laptop at the same time as my PS3 to watch Hulu on TV. I was really hoping your solution was on the PS3. Don’t get my wrong, it is SUPER you came up with this, and I really really appreciate it. I hope there will be some way to make the PS3 work without a proxy…

  5. July 1st, 2009 at 02:27 | #5

    Just to let you guys know the header_access directive has changed in squid 3.0+ is should read

    request_header_access User-Agent deny all

  6. TheObserver
    July 1st, 2009 at 21:51 | #6

    Sure.. there is another way to make it work without running pc/laptop all the time.. is to hack PS3 browser’s User Agent ID.. easy enough to do, right? =)

  7. Snake
    July 1st, 2009 at 22:04 | #7

    i am from outside USA can i do it ? it works on the movies in the store ?

  8. July 2nd, 2009 at 04:13 | #8

    @Snake
    Nope. You’ll still need to be in the US. This will not solve that problem.

  9. Stack
    July 2nd, 2009 at 06:14 | #9

    I dont get this, i’ve been trying to get this to work with Squid 2.7.. but i cant figure out the ip addresses i need to configure.

    I keep getting an error. I’m trying to run squid from Command Prompt in XP. Any help?

  10. July 2nd, 2009 at 06:19 | #10

    @Stack
    You didn’t enter an email address, so I can’t email you. What’s the error? The IP you need to configure as the proxy on your PS3 is your PC’s IP address. If you’re running windows you can get that address by running “ipconfig” from a command prompt. It is most likely 192.168.x.x. If you’re planning on using this solution long term, you should manually configure your PC’s IP address instead of using DHCP from your router.

  11. Snake
    July 2nd, 2009 at 07:38 | #11

    @eric
    is there any way ?

  12. July 2nd, 2009 at 10:04 | #12

    It’s my understanding that TVersity is widely used to defeat DRM and DRM-like practices which restrict which devices are allowed to view different media.

  13. July 2nd, 2009 at 12:12 | #13

    @Dustin
    It “defeats” those rights by decoding the MPEG strem on your PC (which has the DRM tools) and re-encoding the stream DRM free for your uPNP device. Your PC still requires the rights to decode it in the first place. When your PC doesn’t have the rights (i.e. Linux), there’s no way to work around the problem. That’s why TVersity and PlayOn are not options for Linux and it is the same reason why there will not be a Blu-Ray player for Linux for quite a long time.

  14. July 2nd, 2009 at 12:13 | #14

    @Snake
    Not unless you have a friend in the US that is willing to proxy for you.

  15. beermeister
    July 3rd, 2009 at 02:06 | #15

    Hi. I had a spare PC. I loaded Ubuntu server 8.10, then squid with your changes (I had to do sudo /etc/init.d/squid restart, rather than start.) Took about 15 minutes from inserting the ubuntu disk to writing the squid.conf file. Opened Hulu on my PS3 and I am sitting here watching The Philanthropist (probably a waste of time.) Thanks for this. I don’t know what else to do with squid, though. I’ll Google it. But, it works great for Hulu through my PS3. Thanks.

  16. Bill
    July 4th, 2009 at 09:00 | #16

    Hi I’ve been trying to get this working and I seem to be failing somewhere in the config file. Is this line correct?

    acl localnetwork1 src 192.168.0.199

    I tried putting
    acl localnetwork1 src 192.168.0.100/199 which 100-199 is my DHCP range on the router. That returned bad errors upon running “squid -z” though.

    Also if I add the “http_access allow localnet” line I get a fatal error as well. Is this line necessary?

    I would really like to get Hulu going on my tv and this seems to be the best way to do it for now, so any help you can provide is appreciated.

  17. July 4th, 2009 at 13:32 | #17

    @Bill
    Use the default line for your network:

    acl localnet src 192.168.0.0/16

    That will allow 192.168.*.*. If you want to trim it down to 192.168.0.*, use:

    acl localnet src 192.168.0.0/24

    You can’t easily define 100-199 (although it is possible) since it doesn’t fit inside of a standard network mask. Since this will only be available on your internal network, security shouldn’t be that big of a concern.

  18. Bill
    July 4th, 2009 at 14:19 | #18

    Eric, that was what I needed, thanks! Now to figure out why I have sound but no picture on Hulu :/ any ideas? PS3 on a 52″ LG 120Hz

  19. luis
    July 4th, 2009 at 18:47 | #19

    How do I get a squid? I followed links and they are confusing, I finally got to one and my computer can’t uzip the file, I follow links again and I’m still confused. Please help

  20. July 5th, 2009 at 03:14 | #20

    @luis
    It sounds like this is not the solution for you. Try PlayOn or TVersity. They’ll make it easier.

    @Bill
    No clue. I didn’t have any issues with sound.

  21. Zmathue
    July 5th, 2009 at 22:53 | #21

    An easier way to do this is with proxomitron, it is very easy to set up to change your user agent.
    http://www.proxomitron.info/

  22. July 6th, 2009 at 15:17 | #22

    This seems like a great guide for using proxy with Hulu. I am trying to set up a proxy with a VPN to watch Hulu since i am outside of the US. The VPN part is working great, i can watch Hulu from the pc that uses the VPN. What i wanna do is set up a proxy server on that pc so that i can use it as a proxy for my other LAN computers when i want to watch Hulu. After failing at using this proxy config with Fedora9, i upgraded to Fedora11 and, using the config file you provided, i managed to make it work, but still only from the same pc (when i add 127.0.0.1 as the proxy on the pc that squid runs on, it works), but not from the other pcs on the network. Now, even that is broken and i get a 403 error at all pages besides the hulu.com starting page.

    Some info for those that might be having problems with the config file:
    As Gandor said, on some Squid versions you have to replace header_access with request_header_access.
    You also have to put a gap on the refresh_pattern lines between the 1440 and the 20% (or 1440 and 200%, 0 and 0%, 00 and 20% accordingly).
    I also had to add the visible_hostname myhostname line because squid couldn’t get it automaticaly.

    I also had problems with the upgrade_http0.9 so i temporarily disable it (add a # at the beginning of the line), and did the same thing with broken_vary_encoding.
    I hope this will help some people. If anyone has a solution for the last two, i would appreciate it :)

  23. js
    July 7th, 2009 at 02:06 | #23

    Is this still working for you?

  24. July 7th, 2009 at 12:16 | #24

    @js
    yep

  25. Mopenstein
    July 8th, 2009 at 00:32 | #25

    This is for most windows users, it takes quite a bit of tinkering to get Squid working this way for windows.

  26. DanH
    July 8th, 2009 at 22:17 | #26

    Will this work on Windows Mobile?

  27. Josh
    July 8th, 2009 at 23:47 | #27

    Admittedly, I’m not very tech-savvy anymore. I’m having trouble with getting this proxy server running with Squid on Windows XP. I edited the config file as required, but when I try to run the manual internet connection settings on the PS3, it won’t connect through the proxy. I have the correct IP address but the connection test is failing at the “Internet Connection” phase after obtaining the IP successfully. Any advice? Thanks for a cool guide!
    JP

  28. John
    July 9th, 2009 at 11:00 | #28

    Will setting up the proxy mess up my configuration with PlayOn? That is, will I have to go back into the settings and change the proxy back when I want to use PlayOn? Forgive me, but I know nothing about this kind of stuff. Thanks in advance.

  29. d-rell
    July 10th, 2009 at 01:06 | #29

    Worked like a charm on LinuxMint. My only problem is that my proxy server is also my laptop that I use and doing it over wireless gets a wee bit choppy. Still pretty sweet though. For those having a problem where the PS3 will obtain an IP but not connect to the Internet, you need to check the IP address that you put in the squid.conf file. For those of you who get squid to run, but still get no video, make sure that you added BOTH lines to the end of your conf file that the OP posted. I somehow missed “header_access User-Agent deny all” the first time and it no worky. Good luck.

  30. D-Diggity
    July 11th, 2009 at 02:25 | #30

    Wow, your tutorial was incredibly helpful. THANK YOU for your time and effort.

    (Hulu blocked me RIGHT in the MIDDLE of an episode of Eureka a few weeks back when they changed the system, and I’ve been looking for workarounds ever since, including dragging an old PC out of the closet and trying to convert the VGA to component output for an HDTV, and considering installing Yellow Dog Linux on my PS3 just to use the browser.)

    Anyway, I’m on a Mac, OSX 10.4.10, so I downloaded and used SquidMan 2.5 to modify the squid default config file as you directed. The one problem I kept running into was an “unrecognized: ‘header_access’” error. I found a web page that said to try “request_header_access User-Agent deny all” instead of just “header_access User-Agent deny all” and that did the trick.

    I’m a complete n00b to anything that isn’t plug and play, so I couldn’t have done it without you and the other online help. I hope instant Karma pays you handsomely.

  31. nael
    July 13th, 2009 at 04:44 | #31

    Perfect, works and now got hulu back pn ps3 with proxy running on macbook pro.

  32. July 14th, 2009 at 00:31 | #32

    Thank you D-Diggity. I couldn’t get things to work until I used “request_header_access User-Agent deny all”. Now I have hulu in the family room.

  33. eddie
    July 14th, 2009 at 04:49 | #33

    I also was able to use PlayOn to stream Hulu untill it stopped working about a week ago on my PMP device; I understood that this is for PS3, but any chance this fix for hulu will work for other PMP’s such as my “Archos 605 wifi”?

    Thanks.

  34. brn
    July 15th, 2009 at 00:26 | #34

    I did this and it works pretty well. However, when I go to browse the TV shows (alphabetical list of shows), it locks up my PS3.

    I tried narrowing the User-Agent change to hulu.com, but the videos stopped working again. Hulu.com is clearly a front end for some video servers. This could be a good thing. Anyone know the addresses for the actual video content servers?

  35. John
    July 15th, 2009 at 01:14 | #35

    Setup seemed easy enough & I was able to configure the proxy as stated, but when I tried to play a hulu video, my PS3′s browser hung up…

    Anyone else see this?

  36. brn
    July 15th, 2009 at 12:32 | #36

    John, I’m seeing that too, but ONLY when I try to browse an alphabetical list of shows. I disabled the proxy all together and it still happens.

    If I were into conspiracy theory, I’d say that Hulu is not just denying access to PS3 users, they’re intentionally messing up their browsers. It’s a good thing I’m not into conspiracy theory.

    Joost anyone?

  37. bushland25
    July 20th, 2009 at 06:39 | #37

    Works like a charm on Windows!!! I can watch the Mysterious Cities of Gold on a regular TV instead of my tiny monitor. You are the man!

  38. john_d
    August 7th, 2009 at 00:55 | #38

    Eric, I can’t thank you enough for your wisdom and willingness to share. After a couple of hours and many attempts at configuring for Win XP, it finally works!

    For all you windows folks, here is my setup, followed by the config file i used.

    network: 192.168.0.0
    server: 192.168.0.101
    Windows Firewall: OFF!! It sucks anyway. Use a dedicated firewall in a linux box.

    config file:

    # squid config working on john’s x2 machine

    acl all src all
    acl manager proto cache_object
    acl localhost src 127.0.0.1/32
    acl to_localhost dst 127.0.0.0/8
    #
    acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
    #
    acl SSL_ports port 443
    acl Safe_ports port 80 # http
    acl Safe_ports port 21 # ftp
    acl Safe_ports port 443 # https
    acl Safe_ports port 70 # gopher
    acl Safe_ports port 210 # wais
    acl Safe_ports port 1025-65535 # unregistered ports
    acl Safe_ports port 280 # http-mgmt
    acl Safe_ports port 488 # gss-http
    acl Safe_ports port 591 # filemaker
    acl Safe_ports port 777 # multiling http
    acl CONNECT method CONNECT
    #
    http_access allow manager localhost
    http_access deny manager
    #
    http_access deny !Safe_ports
    http_access deny CONNECT !SSL_ports
    #
    http_access allow localnet
    http_access allow localhost
    http_access deny all
    #
    icp_access allow localnet
    icp_access deny all
    #
    http_port 3128
    #
    hierarchy_stoplist cgi-bin ?
    #
    access_log c:/squid/var/logs/access.log squid
    #
    refresh_pattern ^ftp: 1440 20% 10080
    refresh_pattern ^gopher: 1440 0% 1440
    refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
    refresh_pattern . 0 20% 4320
    #
    acl shoutcast rep_header X-HTTP09-First-Line ^ICY.[0-9]
    upgrade_http0.9 deny shoutcast
    #
    acl apache rep_header Server ^Apache
    broken_vary_encoding allow apache
    #
    header_access User-Agent deny all
    header_replace User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729)
    #

  39. August 10th, 2009 at 15:00 | #39

    Sup,

    Can you please get a bit fancier…

    “You can get a bit fancier with the acl’s to make it so ONLY Hulu URLs get the User-Agent replaced. It’s not that hard, but until I have a problem, I don’t see any point in bothering.”

    Youtube is providing a very nice PS3 specific experience, which I am guessing is lost with this workaround for Hulu.

    ~CYD

  40. August 10th, 2009 at 18:18 | #40

    @cydvici0us
    Ask and ye shall receive…

    The instructions above now reflect this, but here’s the short, short version:

    Add:
    acl hulu url_regex -i ^http://.*\.hulu\.com/.*

    Change:
    header_access User-Agent deny hulu

  41. August 10th, 2009 at 23:56 | #41

    Building on the proxy solution you have documented here, I have tweaked the configuration so that it only affects Hulu related network traffic and then packaged it up into a small VM image which I have posted on my blog.

    http://www.kikkoman.org/blog/2009/08/09/hulu-the-ps3-fixed-with-a-small-vm/

    Thanks for figuring out the http-header replacement logic, its really nice to have Hulu working again.

  42. LJ
    August 12th, 2009 at 02:50 | #42

    Did someone at Hulu find a way to block PS3 users with squid? I was watching videos just fine until about 11:30PM (PDT). Now, I can not view any content. Maybe it’s just my connection.

  43. Aaron F
    August 15th, 2009 at 15:00 | #43

    For those of us running Mac OS X, we already have Apache built in the OS that can run as a proxy server. My question is, would it be possible to do this with Apache? I figure it would be easier to just use something already built in, than to install something like squid.

  44. August 15th, 2009 at 15:12 | #44

    @Aaron F
    You can do this with Apache. Look at the docs for mod_header and mod_proxy. The setup may be a little more complicated than squid, though. I would recommend squid unless you really want to use apache, Apache is a webserver that also proxies. Squid is a proxy server. But, with a big enough hammer, you can always pound a square peg through a round hole.

  45. Paul
    August 20th, 2009 at 21:38 | #45

    Two Questions:
    1. The Mac version of Squid gives me an Apple Script error when I try to run the program, any ideas?

    2. I tried the Squid through Fink, it seems to be working according to your directions as far as the web proxy is concerned; it connects. I do get errors when running it from the command line.

    2009/08/20 21:37:00| WARNING: ’0.0.0.0/0.0.0.0′ is a subnetwork of ’0.0.0.0/0.0.0.0′
    2009/08/20 21:37:00| WARNING: because of this ’0.0.0.0/0.0.0.0′ is ignored to keep splay tree searching predictable
    2009/08/20 21:37:00| WARNING: You should probably remove ’0.0.0.0/0.0.0.0′ from the ACL named ‘all’
    2009/08/20 21:37:00| WARNING: ’127.0.0.1′ is a subnetwork of ’127.0.0.1′
    2009/08/20 21:37:00| WARNING: because of this ’127.0.0.1′ is ignored to keep splay tree searching predictable
    2009/08/20 21:37:00| WARNING: You should probably remove ’127.0.0.1′ from the ACL named ‘localhost’
    2009/08/20 21:37:00| WARNING: ’127.0.0.0/255.0.0.0′ is a subnetwork of ’127.0.0.0/255.0.0.0′
    2009/08/20 21:37:00| WARNING: because of this ’127.0.0.0/255.0.0.0′ is ignored to keep splay tree searching predictable
    2009/08/20 21:37:00| WARNING: You should probably remove ’127.0.0.0/255.0.0.0′ from the ACL named ‘to_localhost’
    2009/08/20 21:37:00| parseConfigFile: line 4519 unrecognized: ‘upgrade_http0.9 deny shoutcast’
    2009/08/20 21:37:00| parseConfigFile: line 4527 unrecognized: ‘request_header_access User-Agent deny all’

    The last two seem to be important, the last error being the change suggested above. Please let me know! I’d really appreciate it!

  46. August 20th, 2009 at 21:52 | #46

    @Paul
    It sounds like you have some duplicate lines in your config file.

    For the “upgrade_http0.9 blah blah” line, you can comment that out.

    As for “request_header_access”, try changing that to just “header_access” and see if that works. I don’t have a mac, so I can’t help much, but maybe someone else can chime in.

  47. Paul
    August 22nd, 2009 at 14:09 | #47

    Thanks for the help! I ended up going a new route; I used a VM of Ubuntu Server to run Squid3 and had my brother in law help me out with a cron job that would make sure the server was running with squid all the time. Its set and working now!

  48. Jorge Cea
    September 2nd, 2009 at 17:20 | #48

    Hello there, just a couple of questions,

    my TV is connected with a wireless game adapter connecting to my Lynksys dual band firewall/router, this part works fine (I get and automatic IP from my router) but when I added the proxy address to be used and ran the test, it just does not complete properly.

    Any Ideas?..I have installed squid 2.7 sucessfully on a Windows Server 2008 and the service is running without any problems, is there any way to find out why my ps3 is not connecting to the internet?

    thanks in advance

  49. September 2nd, 2009 at 19:16 | #49

    @Jorge Cea
    It’s hard to say. You can check the logs that squid puts out (I have no idea where they would be in Windows) and that may help. If squid is giving you an access denied message in the logs, check your ACLs.

    You could try setting your PC to use the proxy (in your Firefox or IE settings) and see if your PC can connect through the proxy. That’ll at least narrow the problem down some..

  50. Varius
    September 16th, 2009 at 22:42 | #50

    I’ve set things up and connecting through Squid is working like a charm. Hulu was still seeing my original IP though, so I also replaced X_FORWARDED_FOR in the same way you do User-Agent and that seemed to do the trick. However, any video I try and play just gives me “Sorry, we are unable to stream this video. Check your internet connection and try again.”

    Are there any Squid settings this problem relates to I need to change ??

    Thanks,

Comment pages
  1. June 29th, 2009 at 16:02 | #1
  2. July 1st, 2009 at 23:53 | #2
  3. August 6th, 2009 at 21:14 | #3
  4. August 10th, 2009 at 01:53 | #4
  5. September 22nd, 2009 at 23:37 | #5
  6. December 16th, 2010 at 00:53 | #6
  7. August 24th, 2011 at 02:15 | #7