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 Assuming you've already got Installer.app installed on your iPhone (which you will have installed if you've gone through the jailbreak mentioned above), the first thing you need to do is install OpenSSH. So head to your iPhone's home screen and fire up Installer.app. Now go to the Install tab and tap on System -> OpenSSH and tap the Install button. Once it installs, exit Installer.app. 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 To get your computer and iPhone talking, you'll need to connect your iPhone to the ad-hoc network we created above. To do so, go to the Settings application, tap Wi-Fi, and select your ad-hoc network from the list of available networks.
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)

Assuming you've already got Installer.app installed on your iPhone (which you will have installed if you've gone through the jailbreak mentioned above), the first thing you need to do is install OpenSSH. So head to your iPhone's home screen and fire up Installer.app. Now go to the Install tab and tap on System -> OpenSSH and tap the Install button. Once it installs, exit Installer.app.
If you are using a Mac, just click the Airport icon in your menu bar and click on Create Network. Then just give your network a name and--if you like--a password.
To get your computer and iPhone talking, you'll need to connect your iPhone to the ad-hoc network we created above. To do so, go to the Settings application, tap Wi-Fi, and select your ad-hoc network from the list of available networks.
Once you're connected, tap the blue arrow next to your new network to get info on your connections--namely your IP address. Write that puppy down because you'll need it in a second.
If this is the first time you're SSHing into your iPhone, it may take a bit for your secure key to be generating, so give it at least 30 seconds. You'll be asked if you're sure you want to continue connecting (answer "yes") and then you'll be prompted for a password. At the time of this writing, the default password for OpenSSH on your iPhone is
First, open the Safari Preferences, go to the Advanced tab, and click the Proxies "Change Settings" button. Make sure you're looking at your Airport advanced settings and are viewing the Proxies tab. Tick the SOCKS Proxy checkbox, enter localhost in the section labeled SOCKS Proxy Server and 9999 in the port next to it. Hit OK and Apply your settings. Then just head back to Safari and you're ready to browse.
Make Money Online
|