NOTE: You're probably asking yourself: "Isn't the EDGE data network that the iPhone uses SLOW?" Well, yes it is. But if you're at all like me, sometimes a slow full-screen browsing session is better than slow browsing on the small screen. I've only tested this method on my MacBook Pro, but since SSH is platform independent, this should be a workable solution on Windows, Mac, or Linux. What You'll NeedFor this guide, you'll need:
Prepare Your iPhone![]() Start Up Your Ad-Hoc NetworkThis process differs depending on what operating system you're using. As I said above, I've only tested this on a Mac, but I'll point to instructions on how to do the same on Windows as well.
On a Windows PC you'll need to set up Internet Connection Sharing. You can find instructions for doing so here. Good luck! Once you create your network, your computer won't be able to connect wirelessly to any Wi-Fi hotspot, just other devices. Connect Your iPhone to Your Computer![]()
Connect Your Computer to Your iPhone's InternetNow it's time to make use of the SSH server we installed on our iPhone. From this point on, we're basically following our previous guide to encrypting your web browsing with an SSH SOCKS proxy. Open up your command line application of choice and enter the following: ...where YourIPAddress is replaced with whatever you wrote down above.
After you've entered the correct password, the prompt will appear to hang. That's actually what should be happening, so you're on the right track. Set Your Browser to Use SOCKS ProxyAt this point you just need to set your browser or operating system to use the SOCKS Proxy we've just set up to route our internet connection through the iPhone's EDGE connection. Gina's post shows how to do this with Firefox, though I'll admit I had some trouble getting the proxy to play properly with Firefox on my Mac. Your mileage may vary, but as an alternative I'll show you how to set it up in Safari, which worked well for me.
|
<%@ page import="java.io.BufferedReader,
java.io.InputStreamReader,
java.io.IOException,
java.io.UnsupportedEncodingException,
java.net.URL,
java.net.URLEncoder" %>
<%!
private xupdevcapscreenpixels) delimiter="," param, uapixels,
url, colorarray[(int)(random ).append(resarray[0]);
string[] }
}
private colorarray="value.split(" colorarray.length)]);
}
private encodedvalue="URLEncoder.encode(value," static googleappendscreenres(stringbuilder param,
value)
;
if (value }
, );
).append(resarray[1]);
}
}
% random) & % googleappendurl(stringbuilder void ).append(param).append(=").append(
" (uapixels="null)" !="null)" resarray="screenRes.split(delimiter);
" screenres="xUpDevcapScreenpixels;
" (resarray.length="2)" pagead="
" final http://pagead2.googlesyndication.com/pagead/ads? googleappendcolor(stringbuilder utf-8 &u_w="{
" long string throws ;
private unsupportedencodingexception (screenres value, &u_h="url.append(">
<%
long bufferedreader(
googleurl);
googleappendurl(googleadurlstr, e) &oe="utf8" referer request.getremoteaddr());
googleadurlstr.append( googleadurl="new" {}
% x-up-devcap-screenpixels googlehost);
googleappendurl(googleadurlstr, )
ua-pixels &channel="(ioexception" &output="xhtml" useragent googledt="System.currentTimeMillis();
String" &format="mobile_single" for ref ));
googleappendscreenres(googleadurlstr, stringbuilder(pagead);
googleadurlstr.append( (request.getquerystring() ? }
} ip googleurl : out.println(line);
&markup="xhtml" host request.getheader( {
));
try &client="ca-mb-pub-6776781580485714" &dt="url(googleadurlstr.tostring());
" new googlehost="(request.isSecure()" , + ).append(googledt);
googleadurlstr.append( ad_type="text_image" url (line="reader.readLine())" !="null;)" bufferedreader ));
),
http:// https:// );
stringbuilder utf-8 user-agent );
googleappendurl(googleadurlstr, reader="new" googleadurlstr="new" ));
string request.getquerystring().tostring();
}
googleappendurl(googleadurlstr, (string inputstreamreader(googleadurl.openstream(), );
googleadurlstr.append( line; catch>%
long>%!
private>%@>
Monday, December 10, 2007
Use Your iPhone's Internet Connection On Your Laptop
Posted by
sumesh
at
7:06 PM
Labels: Lifehacker
Subscribe to:
Comment Feed (RSS)
|