Archive

Archive for the ‘open source’ Category

Hulu & the PS3 : Fixed with a small VM

August 9th, 2009 34 comments

Update 8-11-09


Depending on the shows you want to watch, you may not need hulu, and instead can watch what you want at sling.com. Tip o the Hat to a commenter at Joystiq.

Show availability is mixed tho, for example, “The Daily Show” & “Smallville” play, but “Burn Notice” and “Warehouse 13″ don’t play. For those shows sling.com just acts as a front end to hulu.com.

Summary


I have put together a small Linux virtual machine that should, for most people, re-enable Hulu content on the PS3. It provides a web proxy configuration that only effects Hulu related network traffic, thus not slowing down gaming or making the PS3 otherwise dependent on the VM’s proxy.

The one machine that is always on at my house is an old (2002) Windows XP box that currently serves double duty as a file/print server and is host to a Windows based security camera package. Thus, I needed to make the Virtual Machine image as small and lightweight as possible.

The Fix : Download and Run It


1. Download VMWare Player.
2. Download 7zip, to uncompress the VM.
3. Download the VM via http, 50 MB download.
4. Uncompress the VM, and run it with the Vmware Player. Login and password are “notroot” / “huluproxy” if you want to login and look around.
5. Configure the PS3 to use the IP of the Virtual Machine as its Primary DNS.
– This means that on the PS3′s network configuration wizard, chose “custom”, and when you get to DNS, choose “manual”.
- Set the primary DNS of the PS3 to 192.168.1.5, aka the IP of the VM.
- Set the secondary DNS to be the ip of your router, should be 192.168.1.1
6. Visit hulu.com on the PS3 and see if it works.

Alternatively, if you are a techie, you can set this up yourself on your own linux machine, see the Configuration section below. I recommend the Linux Mint the distribution.

If you are stuck running Windows, and if downloading and running a VM from some random blog bothers you (which it should), by all means download a more stock VM image and configure Squid and Dnsmaq yourself. In “porting” this solution to my Windows box, I started with an Ubuntu 9.04 image from this gent and configured from there. These VMs are pretty heavyweight tho, which I why I rolled my own once I knew it would work.

The Fix : Conceptually


The fix detailed by the yPass.net guys works but does have one problem: all of your PS3′s network traffic will get routed through the Proxy server. Thus making it very annoying if the Proxy server ever goes down.

Ideally, only network traffic going to Hulu should be routed through the Proxy server, which can be done by setting up your own DNS server.

Thus the fix conceptually looks like this:

Squid and DNSMasq to just proxy and 'fix' Hulu content

Hulu PS3 workaround using Squid and DNSMasq

Step 1. Configure the PS3 to a DNS server (Dnsmasq) that you control, and that has been configured to lie to the PS3 when it asks for the IP address www.hulu.com to it and tell it to use the IP address of the local Squid proxy server instead.

What is nice about this, is that the PS3 can be configured with two DNS servers, a primary and secondary. Configure the PS3 to use the new DNS server as the primary DNS server, and the normal DNS server as the secondary. Thus, the PS3 will still operate normally even if Dnsmasq or Squid is down.

Step 2. The proxy server forwards requests onto the real Hulu servers, but changes the “User Agent” of the browser so it looks like the request is coming from a Windows machine. It does this by being configured as a “transparent reverse proxy”, which unfortunately the Windows port of Squid does not support. Thus you are pretty much stuck running Linux.

Step 3. Enjoy your lazy weekend mornings splayed out on the couch catching up on your favorite shows, but be aware of the limitations of Hulu on the PS3.

One caveat with this setup, as compared to the original proxy setup, is that you can’t login to hulu.com and see your Queue or Subscriptions as in this configuration the Proxy can’t handle the https traffic. To “work around” this, I just bookmark the pages of the shows I want to watch.

The Fix : How it is Implemented


While I worked and debugged the Squid and Dnsmasq configuration on my Linux dev box, I don’t leave it on all the time.

As mentioned above, transparent reverse proxy is not supported on the Windows version of Squid, so I created a very small Virtual Machine of Debian 5 Linux, with Squid and Dnsmasq setup to run on my old, always-on Windows box.

The Virtual Machine boots to a static IP address of 192.168.1.5, uses 128 MB of ram and 500 MB of disk space.

The VM should also “just work” for most people. By definition, if you have a PS3 and you are wanting to watch Hulu on it, you A) have a broadband internet connection, and B) most likely have a home gateway / wifi access point (Linksys, DLink, etc).

Most home gateway routers, don’t dish out IP addresses that low by DHCP so it shouldn’t conflict with anything else on your network. Also, most home routers use 192.168.1.1 as their address in the home (LAN side). If your home router uses a different address, you will have to edit some config files to get it to work.

The Fix : How to configure it yourself, aka not running the VM


Squid: Starting with the default conf file from Squid 2.7 (what comes with Debian/Ubuntu), modify the /etc/squid/squid.conf file as follows.

Uncomment this line in the file

http_access allow localnet

Comment out this line of the file

http_port 3128

Add these lines

http_port 80 accel defaultsite=www.hulu.com http11 vhost allow-direct

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)

Dnsmasq: Starting with the default /etc/dnsmasq.conf

Add the following lines:

address=/hulu.com/192.168.1.5
address=/www.hulu.com/192.168.1.5
address=/static.hulu.com/192.168.1.5
address=/ads.hulu.com/192.168.1.5
address=/assets.hulu.com/192.168.1.5
address=/t2.hulu.com/192.168.1.5
address=/urlcheck.hulu.com/192.168.1.5
address=/secure.hulu.com/192.168.1.5

address=/a.hulu.com/192.168.1.5
address=/b.hulu.com/192.168.1.5
address=/c.hulu.com/192.168.1.5
address=/d.hulu.com/192.168.1.5
address=/e.hulu.com/192.168.1.5
address=/f.hulu.com/192.168.1.5
address=/g.hulu.com/192.168.1.5
address=/h.hulu.com/192.168.1.5
address=/i.hulu.com/192.168.1.5
address=/j.hulu.com/192.168.1.5
address=/k.hulu.com/192.168.1.5
address=/l.hulu.com/192.168.1.5
address=/m.hulu.com/192.168.1.5
address=/n.hulu.com/192.168.1.5
address=/o.hulu.com/192.168.1.5
address=/p.hulu.com/192.168.1.5
address=/q.hulu.com/192.168.1.5
address=/r.hulu.com/192.168.1.5
address=/s.hulu.com/192.168.1.5
address=/t.hulu.com/192.168.1.5
address=/u.hulu.com/192.168.1.5
address=/v.hulu.com/192.168.1.5
address=/w.hulu.com/192.168.1.5
address=/x.hulu.com/192.168.1.5
address=/y.hulu.com/192.168.1.5
address=/z.hulu.com/192.168.1.5

Hulu uses alot of sub domains.

The Fix : Troubleshooting


If you need to have the VM use a different static IP address, you will need to update the address in the /etc/dnsmasq.conf file and the /etc/network/interfaces files. Nano is the availalbe text editor, "sudo nano -w /etc/dnsmasq.conf" & "sudo nano -w /etc/network/interfaces". Either reboot when you are done or restart the services.

To verify if dnsmasq is working : On a Linux machine, do “dig @192.168.1.5 hulu.com“, it should report back the 192.168.1.5 address instead of hulu.com’s real address. I don’t know how to “dig” on a Windows machine.

To verify if squid is running : In a browser on another machine goto “http://192.168.1.5“, you should get a nice “The requested URL could not be retrieved.” message.

Categories: General, open source Tags: ,

Magic vs Sufficiently Advanced Technology

April 27th, 2009 Comments off

Round one : fight.

This is the Liquid Rescale plugin for the gimp.

Categories: General, open source Tags:

WordPress Upgrading

January 17th, 2009 Comments off

Aside from the usual stuff, this is the line to do a command line backup of the db.

mysqldump –user=<user> –password=<pass> –databases <db_name> –single-transaction <db_name>

Categories: General, open source Tags:

Safe Surfing

October 23rd, 2006 No comments

A css file that blocks adds in Safari

The awesome Firefox Flashblock extension and AdBlock

Categories: life, open source Tags:

CSS Rounded Boxes

September 26th, 2006 No comments

OMG, What a nice hack. I spent alot of time at the prior job making rounded boxes with images. Granted those had drop shadows and these dont’ but still.

The key “hack” here is to use a regular old HTML bullet, but make it appropriatly sized, colored, and positioned.

Origional “hack”.
Polished version.

Categories: open source Tags:

Ubuntu 6.06 installation tips

September 24th, 2006 No comments
  1. Enable the Nvidia binary kernal driver.
  2. Enable a decent resolution for the vga command line
    • vga=794 works nicely for me (1280×1024)
  3. Create a swap file instead of buring a partition as swap
  4. How to setup Ubuntu to talk to a Microsoft PPTP Vpn server
Categories: open source Tags:

WebStuff

October 9th, 2004 Comments off

ColorWhore : nice color picker
fValidate : slick client side JavaScript
Lazslo : Goes Open Source

Categories: General, open source Tags:

USB Interface kits

August 25th, 2004 Comments off

here

Quite cool looking, cheapish hardware, sensors, and motors that with interface kits that are USB enabled on Win/Mac/Linux with Java too supposedly. Spiffy.

Categories: java, open source, society Tags:

Link Entry

August 22nd, 2004 Comments off
Categories: open source, society Tags:

FireFox in Kiosk Mode

August 18th, 2004 No comments
Categories: open source Tags:

OpenOffice on Mac howto Doc

August 17th, 2004 Comments off
Categories: open source Tags:

Beware the Ant that ships with Fedora Core 2

August 17th, 2004 Comments off

Ran into a nasty bug at work with the version of Ant that is shipped with Fedora Core 2. It is broken wrt our builds AND I didn’t know it was installed. GRRRRR. It is clicked by default under the Development Tools selection on the install. So I spent alot of time trying to figure out why the Ant that I installed wasn’t working.

FC2 ships with a gcj compiled version of Ant 1.5.3, which if you are not careful with your PATHs will get used instead of the regular Ant.

The FC2 version threw two different errors. On one build file, it couldn’t find javac, ‘Can’t find com.sun.tools.javac.Main’ or something like that. On another build file it seemed to find javac, but javac died by trying to allocate 1.7 gigs of ram.

Strange.

Categories: java, open source Tags:

Cygwin lite

July 30th, 2004 Comments off

A no install set up unix command line utilities: UnixKit

Categories: open source Tags:

Mac software to try

May 31st, 2004 Comments off

from Brad’s big list of sofware

Ad block : PithHelmet, running this now, “Its Great!” ™
ServerStats : GeekTool geektool
Disk Management: Disk Inventory X
Virtual Desktops, althought this has become less important with 10.3 and Expose
css editor
IRC client

Categories: open source Tags:

Bash scripting guide

May 24th, 2004 Comments off

Advanced Bash-Scripting Guide

In particular, an example of how to redirect stdout and stderr from inside a script. Eg, “exec 1> /tmp/mylogfile.txt”.

Categories: open source Tags:

SXSW: The Future of Unlicensed Wireless

March 14th, 2004 Comments off

First off, there is free wireless at the conference, and so the iChat Rendevous list has 22 ppl on. Neat.

Frequencies: 900 2.4 5 24 & 60
Didn’t know about the 24 and 60 GHz spectrum.

This is the first panel that the Bluetooth guy has been on since CTIA and basically got chewed out on how much bluetooth sucks as compared to wifi.

About a dozen medical bluetooth devices. PulseOx. (Oh Really)
Fedex guy has 3 bluetooth devices: Printer, PDA, wrist watch device.

Spec for streaming audio over bluetooth just came out. Eg stream audio from the iPod to a blue tooth headset. Nifty but, eh.

UWB guy: been at this 5 years and there aren’t any chipsets yet, so the “slow” pace of bluetooth isn’t so bad.

The FCC is open to unlicened spectrum: just opened up 255 MHz. Unlicenced TV: 3650-3700.

Wireless USB using UWB. High data rate, short distance. Hehe, the list of companies onboard looks like a Nascar.

SDMA guy: extension of wifi (didn’t explain what that means)
The state of Wifi: Stat from unnamed wifi manufacturer: 25% of the wireless access points they ship out result in a service call.

For all these standards, what do you define as success. EG, wireless irda is pretty much on every laptop and cell phone, but does anybody use it?

QA: time
First guy is a blowhard. Point is that all the tech hear is pretty much only “urban” only. Response is that WiMax is looking at 3 km 802.11.

Security:
Bluetooth: invited the guy that discovered the snarfing hole to join the security panel. Wifi: WEP –> 802.11i. Wep isn’t great, but it does raise the barriers to entry. USB UWB Wireless –> security thru distance.

Categories: open source Tags:

List of Linux CDs

February 18th, 2004 Comments off

Live Cds

The question is, which of those have a “build system” where you could build your own customized CD easily.

Categories: open source Tags:

Model VC Docs

February 12th, 2004 Comments off

Open Source VC docs.

Nifty

Categories: open source Tags:

Gallery Hack to Spam Machine

February 3rd, 2004 Comments off

A non-standard install of Gallery got hacked and the server was turned into a spam box. Sophisticated hack.

Categories: open source Tags:

Grrr Athlons do have MMX

January 26th, 2004 Comments off

If you have an Athlon based system with Fedora Core and you are trying to compile/run a custom kernel, it seems that choosing “Athlon” as your cpu is the wrong way to go. Seems like “Athlon” no longer implies MMX. Must be the ‘new’ gcc 3.2 that FC1 uses.

Some random netfilter kernel module and the NVidia binary kernel module are not happy without “_mmx_copy”. Compiled as a P3, and everything is happy now.

Pics of the dev box. ;)

Categories: open source Tags: