Homan 發表於 27-6-2009 03:26:04

怎樣利用iphone來讓macbook pro 上網

<h1><a href="http://lifehacker.com/327066/use-your-iphones-internet-connection-on-your-laptop" class="top">Use Your iPhone's Internet Connection On Your Laptop</a></h1>
               
<div class="entry">
               
        <div class="post-byline">
       
               
                                                                               
                                        By <cite><a rel="nofollow" href="http://lifehacker.com/people/adam.pash/posts/" title="Click here to read posts written by ADAM PASH">Adam Pash</a></cite>,
               


                                                <a rel="nofollow" href="http://lifehacker.com/software/feature/use-your-iphones-internet-connection-on-your-laptop-327066.php">12:00 PM</a> on Thu Nov 29 2007,
                               
                               
               
                                       
                                                        573,645 views                <span class="editor_controls hide gawkerWidget_editorcontrols gwId_6924">
                                                (<span class="for_editors control cn_for_editors hide"><a class="edit_link control cn_edit_link" href="http://publish.lifehacker.com/ged/327066" target="_new" title="edit this post">Edit post</a>,
                                <a class="draft_link control cn_draft_link postId_327066" href="http://lifehacker.com/software/feature/use-your-iphones-internet-connection-on-your-laptop-327066.php#" title="Make this post DRAFT">Set to draft</a>,
                        </span><a class="slurp_toggle control cn_slurp_toggle" href="http://lifehacker.com/software/feature/use-your-iphones-internet-connection-on-your-laptop-327066.php#" title="Syndicate this post to an other site">Slurp</a>)
                        <div class="slurp_dialog control cn_slurp_dialog" style="display: none;">
                                <form class="slurp_form control cn_slurp_form" method="get">
                                        <p>Copy this whole post to another site</p>
                                        <div id="formelements">
                                                <div class="right">
                                                        <div class="right">
                                                                <button type="submit" class="bttn slurp_bttn slurp_button control cn_slurp_button">Slurp</button>
                                                                <a class="slurp_cancel control cn_slurp_cancel" href="http://lifehacker.com/software/feature/use-your-iphones-internet-connection-on-your-laptop-327066.php#">cancel</a>
                                                        </div>
                                                        <div class="slurp_indicator control cn_slurp_indicator hide right"><img alt="sending request" src="http://cache-foo.lifehacker.com/gawker/assets/base.v8/img/progressIndicator_roller.gif" style="border: medium none ; margin: 0px; padding-right: 3px;" height="16" width="16"></div>
                                                </div>
                                                <select class="site_select control cn_slurp_select" name="siteId">
                                                        <option value="-1">select site</option>
                                                        <option label="advertising" value="43">advertising</option>
<option label="consumerist" value="31">consumerist</option>
<option label="deadspin" value="11">deadspin</option>
<option label="defamer" value="1">defamer</option>
<option label="fleshbot" value="2">fleshbot</option>
<option label="gay fleshbot" value="12119">gay fleshbot</option>
<option label="gawker" value="7">gawker</option>
<option label="gizmodo" value="4">gizmodo</option>
<option label="idolator" value="33">idolator</option>
<option label="io9" value="8">io9</option>
<option label="jalopnik" value="12">jalopnik</option>
<option label="jezebel" value="39">jezebel</option>
<option label="kotaku" value="9">kotaku</option>
<option label="lifehacker" value="17">lifehacker</option>
<option label="valleywag" value="34">valleywag</option>
<option label="artists" value="37">artists</option>
<option label="gawkershop" value="42">gawkershop</option>

                                                </select>
                                               
                                                <input name="op" value="addsitetag" type="hidden">
                                                <input name="postId" value="327066" type="hidden">
                                        </div>
                                </form>
                        </div>
                       
                </span>
                <div style="position: absolute; right: 0px; margin-top: -20px;">
       
        </div>
</div>

        <!-- google_ad_section_start -->
       
               
<p><img src="http://www.lifehacker.com/assets/resources/2007/11/iphone-tether-head.png" class="postimg" style="display: block;" height="250" width="463"><br>
<iframe src="http://digg.com/api/diggthis.php?u=http://digg.com/software/Use_Your_iPhone_s_Internet_Connection_On_Your_Laptop" align="right" frameborder="0" height="82" scrolling="no" width="55"></iframe>It's
great that your iPhone has a data plan and a killer mobile browser, but
when you're sitting at the airport waiting to catch a plane with your
laptop right next to you, wouldn't it be nice to use your full-on
desktop browser? Out of the box your iPhone won't allow you to tether
your EDGE data connection to another computer wirelessly, but with a
little ingenuity on your part you'll be browsing the net on your laptop
through your iPhone's data service in no time.</p>


                                       
<p><em>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.</em></p>
<p>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.</p>
<h3 style="font-size: 120%; margin-top: 20px;">What You'll Need</h3>
For this guide, you'll need:
<ul><li>A computer with Wi-Fi capable of <a href="http://lifehacker.com/software/ultranewb/share-your-macs-internet-connection-wirelessly-283088.php">creating an ad-hoc computer-to-computer connection</a> (yours is)</li><li>A jailbroken iPhone (If you don't know how to jailbreak your
iPhone, the easiest way is to make sure you're running 1.1.1 firmware
and <a href="http://lifehacker.com/software/how-to/jailbreak-your-iphone-or-ipod-touch-with-one-click-316287.php">then start here</a>.</li><li>The OpenSSH iPhone application (I'll show you how to get this below)</li><li>An SSH client on the computer you're using. If you're on a Mac or
*nix machine, you should be fine. Windows users should check out <a href="http://lifehacker.com/software/home-server/geek-to-live--set-up-a-personal-home-ssh-server-205090.php">how to install OpenSHH with Cygwin</a>.</li></ul>
<h3 style="font-size: 120%; margin-top: 20px;">Prepare Your iPhone</h3>
<img alt="install-ssh.jpg" src="http://www.lifehacker.com/assets/resources/2007/11/install-ssh.jpg" class="postimg" align="right" height="187" width="305">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 -&gt; OpenSSH and tap the Install button.
Once it installs, exit Installer.app.
<h3 style="font-size: 120%; margin-top: 20px;">Start Up Your Ad-Hoc Network</h3>This
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.
<p><img alt="ad-hoc 1.png" src="http://www.lifehacker.com/assets/resources/2007/11/ad-hoc%201.png" class="postimg" align="right" height="125" width="305">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.</p>
<p>On a Windows PC you'll need to set up Internet Connection Sharing. You can find instructions for doing so <a href="http://www.annoyances.org/exec/show/ics">here</a>. Good luck!</p>
<p>Once you create your network, your computer won't be able to connect wirelessly to any Wi-Fi hotspot, just other devices.</p>
<h3 style="font-size: 120%; margin-top: 20px;">Connect Your iPhone to Your Computer</h3>
<img alt="connect-to-network.jpg" src="http://www.lifehacker.com/assets/resources/2007/11/connect-to-network.jpg" class="postimg" align="right" height="108" width="302">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.
<p><img alt="ip-addy.jpg" src="http://www.lifehacker.com/assets/resources/2007/11/ip-addy.jpg" class="postimg" align="right" height="255" width="304">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.</p>
<h3 style="font-size: 120%; margin-top: 20px;">Connect Your Computer to Your iPhone's Internet</h3>
Now it's time to make use of the SSH server we installed on our iPhone. From this point on, we're basically following our <a href="http://lifehacker.com/software/ssh/geek-to-live--encrypt-your-web-browsing-session-with-an-ssh-socks-proxy-237227.php">previous guide to encrypting your web browsing with an SSH SOCKS proxy</a>. Open up your command line application of choice and enter the following:
<blockquote><code>ssh -ND 9999 root@YourIPAddress</code></blockquote>
<p>...where YourIPAddress is replaced with whatever you wrote down above.</p>
<p><img src="http://www.lifehacker.com/assets/resources/2007/11/host-key.png" class="postimg" style="display: block;" height="88" width="463">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 <code>alpine</code>, though you should <a href="http://faq.oneandone.co.uk/server/root_server/howto/7.html">change the root password when you get a chance</a>.</p>
<p>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.</p>
<h3 style="font-size: 120%; margin-top: 20px;">Set Your Browser to Use SOCKS Proxy</h3>
At 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 <a href="http://lifehacker.com/software/ssh/geek-to-live--encrypt-your-web-browsing-session-with-an-ssh-socks-proxy-237227.php">shows how to do this with Firefox</a>,
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.
<p><img src="http://www.lifehacker.com/assets/resources/2007/11/configure-proxy.png" class="postimg" style="display: block;" height="138" width="463">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.</p>
<h3 style="font-size: 120%; margin-top: 20px;">Couldn't This Work Better?</h3>
I'll admit that my SSH/SOCKS chops are slim, so it's very likely this
method could be built on to work even better than what I've set up
above. That said, I can now browse from my laptop for free anywhere
I've got my iPhone, so it could be worse. There are other methods
available for tethering your iPhone, <a href="http://cre.ations.net/blog/post/tether-your-iphone">particularly this one</a>,
but I like the comparatively easy setup and cross-platform-ness of my
setup. Alternatively, if you're feeling particularly adventurous/bored,
you can boost your iPhone connection to 3G speeds by <a href="http://gizmodo.com/gadgets/3g/turn-your-iphoneitouch-into-a-3g-web-device-309320.php">tethering the iPhone to a 3G mobile phone</a>
(which would be absurdly cumbersome). Tethering your iPhone to your
laptop may be against AT&amp;T's terms of service, so keep that in mind
if you decide to go forward with this. If you've tried this or a
similar method and have your own tips, let's hear them in the comments.
<em>Thanks to Lifehacker reader Vinod Panicker for the great idea.</em>
<p>If you're looking for more cool ways to put that iPhone to use, check out my <a href="http://www.amazon.com/How-Do-Everything-Your-iPhone/dp/0071497900/">iPhone book</a>.</p>
<p><em><strong><a href="http://adampash.com/">Adam Pash</a></strong> is a senior editor for Lifehacker who enjoys a good iPhone hack—hell, he <a href="http://www.amazon.com/How-Do-Everything-Your-iPhone/dp/0071497900/">wrote the book on it</a>. His special feature <a href="http://www.lifehacker.com/software/hack-attack/">Hack Attack</a> appears every Tuesday on Lifehacker. Subscribe to the <a href="http://www.lifehacker.com/software/hack-attack/index.xml">Hack Attack RSS feed</a> to get new installments in your newsreader.</em></p>

                                                                <!-- google_ad_section_end -->   
       
</div>



<div id="post-supplement">

        <div id="related">
                Read More:
       
                                   <a class="tag" href="http://lifehacker.com/tag/feature/" title="Click here to read more posts tagged FEATURE">Feature</a>,                
                                   <a class="tag" href="http://lifehacker.com/tag/encryption/" title="Click here to read more posts tagged ENCRYPTION">Encryption</a>,                
                                   <a class="tag" href="http://lifehacker.com/tag/gizmodo/" title="Click here to read more posts tagged GIZMODO">Gizmodo</a>,                
                                   <a class="tag" href="http://lifehacker.com/tag/hack-attack/" title="Click here to read more posts tagged HACK ATTACK">Hack Attack</a>,                
                                   <a class="tag" href="http://lifehacker.com/tag/ssh/" title="Click here to read more posts tagged SSH">SSH</a>,                
                                   <a class="tag" href="http://lifehacker.com/tag/top/" title="Click here to read more posts tagged TOP">Top</a>,                
                                   <a class="tag" href="http://lifehacker.com/tag/command-line/" title="Click here to read more posts tagged COMMAND LINE">Command Line</a>,                
                                   <a class="tag" href="http://lifehacker.com/tag/iphone/" title="Click here to read more posts tagged IPHONE">iPhone</a>,                
                                   <a class="tag" href="http://lifehacker.com/tag/terminal/" title="Click here to read more posts tagged TERMINAL">Terminal</a></div></div><!-- sidebar -->
<script type="text/javascript">

// onload hacks here
window.onload = function() {
                try
                {
                        $('ad-300x250').descendants().each( function( el ) {
                                if( el.readAttribute('src') != undefined ) {
                                        if( el.readAttribute('src').match( /817-grey.gif/ ) ) {
                                                expandTopStories();
                                        }
                                }
                        });
                        if($('ad-300x250').innerHTML.trim().length == 0) expandTopStories();
                       
                        if($$('#content .metadata .ad300x40')){                       
                                var cont = $$('#content .metadata .ad300x40');
                                for(i=0;i<cont.length;i++){
                                        var el = cont.descendants();
                                        found = false;
                                        for(j=0;j<el.length;j++)
                                        {
                                                if( el.readAttribute('src') != undefined ) {
                                                        if( el.readAttribute('src').match( /817-grey.gif/ ) ) {
                                                                found = true;
                                                        }
                                                }
                                        }
                                        if(!found)
                                        {
                                                cont.style.marginBottom = '10px';
                                        }
                                }
                        }
                        if($('ad-160x160-bottom')){
                                if($('ad-160x160-bottom').innerHTML.trim().length == 0) {
                                        $('ad-160x160-bottom').style.display = 'none';
                                        $('spacer160').style.marginTop = '-1.5em';
                                        $('spacer160').style.borderTopWidth = '0';
                                } else {
                                        $('ad-160x160-bottom').descendants().each( function( el ) {
                                                if( el.readAttribute('src') != undefined ) {
                                                        if( el.readAttribute('src').match( /817-grey.gif/ ) ) {
                                                                $('ad-160x160-bottom').style.display = 'none';
                                                                $('spacer160').style.marginTop = '-1.5em';
                                                                $('spacer160').style.borderTopWidth = '0';
                                                        }
                                                }
                                        });
                                }
                        }
                        if($('ad-160x160')) {
                                if($('ad-160x160').innerHTML.trim().length == 0) {
                                        $('ad-160x160').style.display = 'none';
                                        $('spacer160').style.marginTop = '-1.5em';
                                        $('spacer160').style.borderTopWidth = '0';
                                } else {
                                        $('ad-160x160').descendants().each( function( el ) {
                                                if( el.readAttribute('src') != undefined ) {
                                                        if( el.readAttribute('src').match( /817-grey.gif/ ) ) {
                                                                $('ad-160x160').style.display = 'none';
                                                                $('spacer160').style.marginTop = '-1.5em';
                                                                $('spacer160').style.borderTopWidth = '0';
                                                        }
                                                }
                                        });
                                }
                        }
                        if($('skyscraper')) {
                                if($('skyscraper').innerHTML.trim().length == 0) {
                                        collapseSkyscraper();
                                } else {
                                        $('skyscraper').descendants().each( function( el ) {
                                                if( el.readAttribute('src') != undefined ) {
                                                        if( el.readAttribute('src').match( /817-grey.gif/ ) ) {
                                                                collapseSkyscraper();
                                                        }
                                                }
                                        });
                                }
                        }
                        if($('interruptor')) {
                                if($('interruptor').innerHTML.trim().length == 0) {
                                        $('interruptor').style.display = 'none';
                                } else {
                                        $('interruptor').descendants().each( function( el ) {
                                                if( el.readAttribute('src') != undefined ) {
                                                        if( el.readAttribute('src').match( /817-grey.gif/ ) ) {
                                                                $('interruptor').style.display = 'none';
                                                        }
                                                }
                                        });
                                }
                        }
                $('content_container').style.borderBottom = '1px #CCC solid';
                } catch(e) {}
};


</script>



                <script type="text/javascript">var ganjaDynamicContent = null;</script>

Homan 發表於 27-6-2009 03:29:08

另一個方法…

http://www.iphonemodem.com/<br><br><h3>What is iPhoneModem</h3>


      <p>iPhoneModem enables sharing of the iPhone's Internet connection with
            your Mac or PC.</p>

      <p>It's a beautiful, simple and small
            footprint application for the iPhone and the Desktop computer that anyone can use on a few seconds.</p>

      <p>iPhoneModem is available for <em>Jailbreaked devices</em> using the cydia package manager on the
            phone.</p>

      <p>To make connecting a one click task, you should also download the <a href="http://www.iphonemodem.com/#ahelper">helper</a>
            application for your computer.</p>

      <h3>What's new</h3>

      <p><strong>1. Window Vista / XP and MacOS support</strong></p>

      <p><strong>2. Very strong <a href="http://en.wikipedia.org/wiki/SOCKS" target="_blank">Socks Proxy</a></strong>
      </p>

      <p><strong>3. New HTTP/HTTPS and DNS proxies</strong></p>

      <p><strong>4. Traffic monitoring</strong></p>

      <p><strong>5. Even more <a href="http://www.iphonemodem.com/#apps">apps</a> now suported</strong></p>

      <p><strong>6. iPhoneModem can now run in background for registered users</strong></p>

      <p><strong>7. New user interface</strong></p><br>

wongfai 發表於 27-6-2009 03:36:27

回復 2# 的帖子

有 wifi 就直接上啦 , 駁 iphone 做咩呀 ? :L

hongdonald 發表於 27-6-2009 09:20:24

可能佢經電話既生滋網絡來上
小弟以前係人仔年代都係用電話+bt來用notebook上網,速度仲

egg_studio 發表於 27-6-2009 18:45:13

回復 4# 的帖子

我依家仲係用緊 Peoples $98 經電話駁 iBook

hongdonald 發表於 27-6-2009 20:09:45

原帖由 <i>egg_studio</i> 於 2009-6-27 18:45 發表 <a href="http://photomarket.hk/redirect.php?goto=findpost&amp;pid=8365&amp;ptid=1029" target="_blank"><img src="http://photomarket.hk/images/common/back.gif" alt="" border="0"></a>
我依家仲係用緊 Peoples $98 經電話駁 iBook <br>如果全文字網頁都ok<br>假如有圖.片.flash既網頁,你真係想<img smilieid="33" src="http://photomarket.hk/images/smilies/others/middlefinger.gif" border="0">佢<img smilieid="33" src="http://photomarket.hk/images/smilies/others/middlefinger.gif" border="0"><img smilieid="33" src="http://photomarket.hk/images/smilies/others/middlefinger.gif" border="0"><img smilieid="33" src="http://photomarket.hk/images/smilies/others/middlefinger.gif" border="0"><img smilieid="33" src="http://photomarket.hk/images/smilies/others/middlefinger.gif" border="0"><br>

wongfai 發表於 28-6-2009 10:07:12

回復 6# 的帖子

上小陣會死咩 ....

c_Foo 發表於 28-6-2009 12:50:10

<P>原帖由 <I>wongfai</I> 於 2009-6-28 10:07 發表 <A href="http://www.photomarket.hk/redirect.php?goto=findpost&amp;pid=8384&amp;ptid=1029" target=_blank><IMG alt="" src="http://www.photomarket.hk/images/common/back.gif" border=0></A> 上小陣會死咩 .... </P>
<P>唔使死,不過有 Notebook 為求方便,都係想找個方便而可靠d既無線上網方法 ~~</P>

hongdonald 發表於 28-6-2009 13:39:17

原帖由 <i>c_Foo</i> 於 2009-6-28 12:50 發表 <a href="http://photomarket.hk/redirect.php?goto=findpost&amp;pid=8386&amp;ptid=1029" target="_blank"><img src="http://photomarket.hk/images/common/back.gif" alt="" border="0"></a>

唔使死,不過有 Notebook 為求方便,都係想找個方便而可靠d既無線上網方法 ~~ <br>C_FOO兄我諗你誤解左wongfai兄既意思la<br>wongfai兄,上少陣真係會死,一日不(keyboard上h右邊的鍵),如格(錯別字)三秋啊<img smilieid="33" src="http://photomarket.hk/images/smilies/others/middlefinger.gif" border="0"><br>
頁: [1]
查看完整版本: 怎樣利用iphone來讓macbook pro 上網