Tag Archive for 'networking'

Wireless proxy configuration for your jailbroken iPhone

You are on your company’s WiFi network. You’ve been able to access intranet sites so far, but now you’d like to access an external site via the company’s HTTP proxy. Your company, however, does not provide a proxy auto-configuration URL. You are therefore stuck with having to add or remove the proxy manually in your iPhone WiFi settings each time you’d like to access external or local sites, respectively.

So how can we make things easier? Simple, create your own proxy.pac file.

Create a text document on your computer. In this file, write the JavaScript code necessary to help Safari use your proxy only when needed. See this Wikipedia page for examples. Here’s what mine looks like:

function FindProxyForURL(url, host) {

proxy = “PROXY companyproxy.address.com:8080″;

// Next, we want to send all traffic to company.net browser direct
if (dnsDomainIs(host, “.my.intranet.domain.com”)) {
return “DIRECT”;
}

// Loopback and localhost goes browser direct always.
if ((host == “localhost”) ||
(shExpMatch(host, “localhost.*”)) ||
(host == “127.0.0.1″)) {
return “DIRECT”;
}

// Test to see if host is an IP address
reip = /^\d+\.\d+\.\d+\.\d+$/g;

if (reip.test(host)) {

// Check for local IP address
if (isInNet(host, “192.168.0.0″, “255.255.0.0″)) {
return “DIRECT”;
}

}

// Default return condition is the proxy, since itâ??s assumed that everything
// else is on the Internet.
return proxy;

} // End of function

Save and name the file as proxy.pac. One site recommended that the file encoding be set to UTF-8, which I followed and it seems fine. Take this file and copy it to anywhere on your iPhone using tools such as iFunbox or iFile or SSH. I put mine in /var/mobile/Documents.

Now go back to your iPhone WiFi Settings in Settings –> Wi-Fi. Tap on the > button of your WiFi network to view its settings. Swipe all the way down and change HTTP Proxy to Auto, and in the URL field type in the file location, e.g. file:///var/mobile/Documents/proxy.pac. Exit, and all your programs should now automatically detect whether a proxy should be used whenever you are on this WiFi network.

the last 40 days…

…might be a good title for a zombie movie. :)

I hate Apple. Wife has a Powebook G4 that’s eligible for a 2006 battery recall, but Apple Malaysia won’t honour it as it is out of warranty. After making calls and making a query on Apple Discussions, I decided to just pass my battery to a colleague going for a vacation in the UK. New battery was delivered no questions asked.

I hate Citibank. When you talk to their customer service people they sound like all they want to do is get rid of you. You know, not in language but in the tone of their voice. Their collections department is so hard to reach.

I hate Streamyx. As usual. Been having sporadic network issues over the weekend since Saturday; download speeds would fall to shit without affecting my uploads. Couldn’t even access Streamyx or TM’s own website. I hate calling for tech support because it usually ends up making things worse.

Customer service is a failboat in this country.

I love Ip-Man. Such an awesome movie.

Upgraded some cables to CAT 6 in the hope that it’ll improve my HD streaming to the PS3. Somehow or rather my Aztech Homeplugs got fried in the process. Such delicate things.

messing around with DLNA

W00t! I think we’ve finally figured out our DLNA setup.

Picked up a pair of Aztech HL108 HomePlugs from Low Yat which totally fixed the Wifi bottleneck problem. 1080 HD content streamed flawlessly from the media server.

The only remaining issues were stream compatibility on the PS3 and codecs. CCCP and TVersity combination did not seem to work for certain AVI-packaged HD content (Harry Potter 6 trailer). Playback of this video on Windows Media Player (WMP) had the video lagging behind audio by a few seconds.

PS3 Media Server (PMS), however, managed to play every single thing we threw at it, except for CDG karaoke files (which TVersity can’t seem to play either). Only caveat is that the media layout on the XMB doesn’t look as clean. There will be files that PMS can’t play the first time, but you’ll have an option to go into a #TRANSCODE# folder for that file and manually choose a transcoding option. You can even change PMS settings from the XMB, but I’ve yet the need to touch anything.

By all means, this doesn’t mean we’re done testing. Both TVersity and PMS are still enabled on the media server. I still want TVersity to work for everything because we may have more DLNA devices in the future (say, another home theater setup in the bedroom :D ). I’m also still wondering how the quality of PMS’ transcoding compare against other products on the market, e.g. TVix (RM 1800~ but looks great) or the WD HD Player. We’ll want to make CDG work as well, as Fai and I are both karaoke freaks. :)