header

Torsten Curdt’s weblog

iProxy – poor man’s tethering

The iPhone – the always online device. What would be more natural than using it on the train as internet connection for your laptop!? Unfortunately that’s not really an option if you

  • don’t want to jailbreak your phone
  • aren’t using one of the “official” carriers
  • don’t want to pay extra
  • want to use iPhone OS 3.1 and up

The only viable solution: a proxy!

That’s exactly what the “Netshare” application was. But it has already been banned from the App Store for a long time. So I thought – I just write my own. A few hours later I was able to reach the internet through my iPhone via the “iProxy” app.

iProxy is not as convenient as the real tethering. The internet connection is a few clicks more away. But if you’ve got a developer certificate (or have a friend that has one) it certainly is cheaper than handing out the money to your favorite telco. Especially if you only need this connection only every now and then.

Now while I cannot make this app available to all the iPhone user out there through Apple, I do make it available as Open Source as of today. iProxy is released under the Apache license and freely available on github.

Enjoy!

  • I'm from Seychelles, iProxy works well in my country as well. Great App
  • Adobeaxcess
    hi, I am trying to get connected (through iProxy) with Windows XP, but having a hard time, does anyone have detailed instructions?
    Also, when I open up iProxy on the iPhone, it shows:

    Point your computer to the PAC file or enter the proxy address and port manually.
    then it gives HTTP and SOCKS (options to turn ON or OFF) along with address

    Is this right?

    I have a iPhone phone running iOS4.2.1

    THANKS

    [email protected]
  • I've always just did this:
    Create network on mac get ip address of iphone device
    using terminal "ssh -ND 9999 IPHONES_IP_ADDRESS"
    then change proxy settings to use localhost and port 9999
    Done thats it. it just works.
  • I am using iProxy on my phone for half a year and i am very very satisfied with it! But i have problems with finding quick and responsible proxy servers :(
  • depends on the ftp app. seems like cyberduck can use the system proxy ...and should in theory work. haven't tested myself though.
  • TimC
    is it possible to use ftp apps with this?
  • Lionel, indeed it is limited.

    We could improve the experience for the laptop/iphone combination. ipad/iphone is more problematic because (at this stage) none of the two can create the ad-hoc network. After this long time I don't think I'll see the code working of the guy who was working on the private API ad-hoc network creation.

    If you guys find someone who is more familiar with the private iOS internals ... the help would be more than welcome.
  • Craig
    Windows instructions would be grand!
  • Lionel
    I appreciate this app, but it's still really limited. I'm trying to use it for my iPad wifi to tether access iPhone's unlimited data. It's such a pain that I have to initiate with my computer at home and if I lose connection i'm screwed.

    Also, my devices will eventually just lose connection to my iProxy server. I was using it this morning, ate lunch at a restaurant and when I looked back at my phone it was not connected to iProxy server I made. Is there any way to stop my phone/ipad from disconnecting from it after a while?

    I tried to reinitialize it today at a public wifi spot, but I could not get it to work. What's the trick with a public wifi to set it up?

    Is there any news on a way to initiate this without a 3rd device. I know you said your friend was working on it at one point.

    Thanks.
  • Phoey
    So this only works with browsers, right? Not Mail.app, iChat (aim or jabber), or anything but a browser? Right? (Please say I'm wrong.)
  • According to the reports there are still a few issues with 2.0. I think mostly related to the restarting of the proxies. If you only turn them one once, they should working though. Best thing is to really stop the application (with the minus in the fast app switching bar) and then try it again.

    And if you run into issues please report them on github at http://github.com/tcurdt/iProx...
  • beyondthetech
    -duplicate-
  • beyondthetech
    Using Proxifier (www.proxifier.com), I am able to make nearly all the other Mac apps work - iChat, Skype, Mail, etc - without having to set the information in the Proxies tab. Just configure Proxifier, and everything gets routed through there easily.

    However, version 2.0 is not working well. Proxifier only works with iProxy 1.0.1. And, for some reason, I have to manually restart iProxy 2.0 after several minutes, as it seems to stop working altogether, regardless if it's running in the background or not.

    Thanks for providing a great program, hopefully you can look into the issues with 2.0!
  • Doug
    Don, did you ever get this running on the iphone4? I have a similar issue with ios4.1 and the iphone4. I can ping the iProxy address but have not been able to get iProxy to pass requests to the 3G connection. I'm using the latest code base from github. I've verified the port settings match between iproxy and my mac proxy setting. Any suggestions would be appreciated.
  • Tried using tsocks unsuccessfully to allow ssh, git, et al access to the iProxy SOCKS5 server.

    Anybody have suggestions on how to route CLI traffic through the socks proxy?
  • Phoey
    Has anybody been able to make this work with Mail.app/iChat at all? I can only use Safari on my Mac through iProxy.
  • Tanglefoot
    ok, so now it's working over IE & firefox. but ONLY if DNS resolution isn't needed. ie, if you put in the IP address it's fine, but if DNS is required then it doesn't work. firefox seems to have a switch to let you route the dns lookup over socks as well, but that's where I get stuck with firefox seeming to want to download an octet/stream file instead of the dns resolution. thoughts?
  • tanglefoot
    nps, but how do you configure XP to use it?
  • Gus
    Tanglefoot: Thanks, I deleted iProxy and rebuilt the app as a Release build (I had been doing debug) and now I'm up and running fine.
  • Tanglefoot
    Hi, a friend has compiled this and i've managed to get it onto the 3GS 4.0.2. Configuring XP to run a ad-hoc network is also quite basic and I can now ping the phone from the computer; but how do you do the socks re-direct? thanks
  • Gus
    Don et al,

    I am also having no success on a 3GS with iOS 4.0.2 - can anyone confirm that this is a valid configuration?
  • Whjones
    I was able to get this working (on a late-2008 MacBook Pro 2.4GHz Intel Core 2 Duo model), but only with web-based apps, such as Safari and iTunes, but with the notable exception of Firefox. I'm using an iPhone 4 with iOS 4.1b3. Additionally, I installed WinXP in a virtual machine using VMWare Fusion, but even though I bridged the network to the Airport and pointed IE to the proxy, I was unable to achieve a network connection. This may be due to the fact that IE5 (default on WinXP) doesn't actually have SOCKS5, but I also met with the same fate using Firefox in that same VM. I tried Mail.app, but also met with no joy. I'm running Mac OS X 10.6.4 and the latest version of Firefox.
  • Hey Alex, this app will certainly not make it into the app store - ever. It is available to everyone that knows how to compile it though ...or who has a friend that do. To get it into the phone you need someone with a developer certificate.
  • Is this app available to all iPhone user through Apple now? I just want to clarify that since you mentioned it in your post 7 months ago. Thanks for taking some time reading this in advance.
  • I am playing with that. Seems like we could fake audio output to stay alive. Multitasking on the iPhone isn't really multitasking ...which makes things a little harder.
  • Carson
    Can we look for multitasking for the app in the future, so we are able to use our iphone for other functions while still maintaining internet sharing with our computer?
  • Don
    Here's my setup:

    http://www.ayefon.com/iproxy.h...

    This is on a 3GS running iOS 4.0.1. Can you see anything I'm missing? I'm pretty network savvy generally but I don't do a lot of this kind of proxy thing.
  • Don
    Roger. I still have my 3GS and I've upgraded it to iOS4. Let me try that to see if that's the key.
  • Hey Don, I fear you missed something. I don't see how Apple could do anything to block what iProxy is doing. I am still on a 3GS with iOS4 so unfortunately I can't deny of confirm the problems you are having.
  • Don
    This is what I was looking for. Unfortunately, I've already moved on in my development to iOS4 and while the code compiles flawlessly and loads and runs on my iPhone 4, I was unable to get it to route over to the 3G connection. I can ping the proxy from my MacBook Pro and have the system routing set up to use the proxy and while all that connects, I suspect that Apple has "plugged" the hole wherein the iPhone will failover and try the 3G connection. Either that or I missed something. I'd be interested to hear from anyone that got this working on iOS4/new iPhone 4
  • dave: I suggest you first try the tutorial videos from Apple and then the wiki/readme should have enough information ...or ask someone to guide you ...or even give you an ad-hoc build. It's really not that hard.
  • dave
    hey is their a step by stepon how to do this. i cant even figure out how to get it from xcode to my phone?
  • Ben
    Awesome idea, thanks so much for releasing it!
    I'm having a problem with DNS, in that lookups just don't seem to happen. I tried manually seeing the proxy and using the pac url, and both have the same behavior. It's working well for IPs, but not at all when it needs to look up a name. I tried putting OpenDNS servers into the airport settings but this didn't help.
    Any ideas what I might be doing wrong or how I could fix? thanks
  • Thanks. 1. Windows: It does not work for me. I changed static IP address in ad-hoc WIFI connection, then proxy in Explorer and Chrome, but no success. Do you have any step-by-step instructions? 2. Mac: Yes, you are right - if I change a profile, it switches, but it does not create an ad-hoc connection.
  • Carson Lee
    Any chance of a xcode 4.1 update for iProxy?
  • Phoey
    Unfortunately I could only make Safari work, not Mail or iChat. My mail server does use SSL, so that could be a problem too. I just don't know enough about this to know what kind of proxy is compatible with SSL Mail and iChat.

    iProxy is a wonderful start. It works fantastically well for Safari. And it's zippier than I thought it would be. :-)
  • Jamshid: also thought that maybe adding a HTTP proxy would be worthwhile ...using another proxy on top sounds too painful.

    Creating a wireless network from the iPhone/iPad needs quite some reverse engineering as there are no public APIs for that. If someone would get that working - that would be sweet! A friend of mine made some progress ...but don't think he got it really working in the end.
  • Phoey: the apps need to be "socksified" ...but usually Cocoa apps should be fine and be using the socks proxy specified in the system configuration. I am surprised at least Mail.app should not be a problem. But I cannot remember whether it worked for me or not.
  • Jamshid
    While browsers can use a "SOCKS proxy" like iProxy to connect to the internet, unfortunately a lot of apps like Skype only work with an "HTTP Proxy". Fortunately, HTTP Proxies are freely available that can use a SOCKS proxy to connect to the internet.
    1) install and run an HTTP Proxy like http://www.pps.jussieu.fr/~jch.../ on your Macbook and tell it to use iProxy. In a Terminal window run:

    % sudo port install polipo
    % sudo launchctl load -w /Library/LaunchDaemons/org.macports.Polipo.plist
    % sudo polipo socksParentProxy=<iphone-ip-address>:8888 proxyAddress=<macbook-ip-address>

    The IPHONE-IP-ADDRESS is what you see when you run iProxy. Your MACBOOK-IP-ADDRESS is shown in Settings=>Network.

    2) In you Macbook's Settings=Network=>Advanced=>Proxies, set "Web Proxy (HTTP)" to Polipo, which is running on MACBOOK-IP-ADDRESS port 8123.

    Yes, it's a pain to set up and a bit flaky.

    I don't know what would be involved in putting HTTP Proxy code into iProxy, or better yet, what code is required to iProxy work like a WiFi Router, like the non-free $10 Cydia (jailbreak) app MyWi, or the old banned app Netshare.</macbook-ip-address></iphone-ip-address>
  • Phoey
    Thank you very much for your efforts. iProxy works well with Safari on my Mac. But I can't make it work with Mail.app (GMail or SSL accounts), Jabber (in iChat) or AIM (in iChat). nslookup doesn't seem to be working from the command-line either. So I'm probably missing something. Any ideas?

    Thank you!
  • Vafer-org
    This is a beautiful thing. Thank you.
  • Yes, I experienced same issue - I had to do a hard restart = hold Home button and Upper button for 5 sec.
  • Thanks. 1. Windows: It does not work for me. I changed static IP address in ad-hoc WIFI connection, then proxy in Explorer and Chrome, but no success. Do you have any step-by-step instructions? 2. Mac: Yes, you are right - if I change a profile, it switches, but it does not create an ad-hoc connection.
  • Allisone: the problem is that the iPad cannot create an ad-hoc network. You will have to work around this. Watch this:

    http://www.youtube.com/watch?v...
  • Allisone
    Hey, first thanks, second problem.

    Cool app, nice instructions.
    Can I also connect my iPad (buying one tomorrow) to the App on my iPhone ?

    Problem:
    I never ever had this, but my iPhone froze completely. No button worked, I tried and failed with building and running another App through XCode. Only Solution: I had to launch iTunes which found my iPhone and on synchronize it just restarted my iPhone. I almost thought I would have to wait till my battery runs dry
  • 1. Should also work with Windows. I would just try with FF. After all it's just a proxy.
    2. I theory that's what Mac OX network locations are for. You just select a profile and it should set everything up. I could not get that to work though.
  • 1. Does it work on Windows? I tried but no success. 2. On Mac: Is it possible to change configuration on one click? Thanks.
  • @Mrme just pushed the updated the Xcode project
  • Mrme
    tcurdt--will you be able to update github with a new build using the latest Xcode/base SDK of v4.0? Please!
  • iDude
    Super cool! Thanks also from Safari via iProxy - excellent skills!
  • Just what I was looking for!
    As soon as I find someone with a iPhone Developer key I'll be trying this out.

    Have you considered multitasking for the new iOS4?

    THANKS

    PS: I'll post as soon as I get it running
  • Justinxxvii
    I second what rob0rob said. Can the GameKit framework be used to establish a bluetooth connection with an iPad?
  • You will need to be able to establish a TCP connection between the devices. Unfortunately setting up an ad-hoc network between the iPad and the iPhone is not possible without a 3 device initiating the network. I know someone is trying to work around this. Will let you guys know if this works out.
  • Hey man. Great app. Many thanks. I'm also interested in sharing via iPad. Is it possible to write an iPad app with a built in browser that transfers it's web data to/from an iProxy iPhone app via bluetooth?
  • jimbob
    Meh. Disregard that - the connection could not be established once the iPhone and iPad had been disconnected for a while... Back to the drawing board :-)
  • jimbob
    Ignore my last comment - I managed to create an ad-hoc network with another type of phone. Now, when I turned the phone off the iPhone and iPad REMEMBERED it whoch it does not do when disconnected from my MAC's ad-hoc network (maybe I told the iPhone/iPad to forget it when I first created it). Regardless, I no longer need to piggyback on a new connection first :-)
  • Jimbob
    Hi, thanks for the great work on the app, I've managed to connect my iPad to my iPhone.

    I'm right in thinking from your post above that we always need a wifi connection (or ad-hoc network) to start the connection, right? I created an adhoc network and it worked great, but thought thats all I'd ever need to do, but couldn't get a subsequent connection unless a network was available to join.
  • The problem is that out-of-the-box the iPad cannot create an ad-hoc networks. So unless you can join the same wifi network we are out of luck here. If you *are* on the same network (just cannot get out) we could make this work. One could "abuse" hotspots for this, but I am not sure that's worth the effort.
  • The Jerk
    Just another request for iPad support somehow. I've had iProxy on my iPhone for some time, but still have never used it! I would use it all the time if I could share internet with my iPad.
  • nick__denton
    great app. but is it possible to create a script on a mac to one click set up the network?
  • There is no obvious way to create an ad-hoc network. The wifi settings on iPad are the same as in iPhone.
  • @gingerbeardman: Would love to work on iPad compatibility but haven't got an iPad yet. First step would be to be able to create an adhoc network between the two devices.

    @Prasanna: I would presume you just need to turn on VPN on your iPhone.
  • Prasanna Gopinath
    This works very nicely with Chrome. I used it almost for 2 hours till my 3G got cut.

    I have a question. How do I use this with my VPN on my mac? It doesn't work wit my vpn. How do I make VPN to see my SOCKS settings? Any help is appreciated. Do I need to turn on VPN on my iPhone? This is very important for me to use company's email ...
  • Is it still to early to talk about iPad compatibility? I mean, I have an iPad, but I can't see any way to create an ad-hoc network between it and my iPhone?
  • That's a little odd. I've used Firefox on Mac to test it all the time.
  • punkdude
    A quick follow up to my previous post about it not working with firefox on windows. After some testing it would appear that it is browser related. Firefox will not work however I quickly installed chrome and that works very well indeed.
  • some code monkey
    This is not working with the latest out of git and attempting to connect with windows 7 laptop to a iphone running 3.1.3 . It runs the proxy is listening on 8888 a wireshark trace shows a request sent to it but no response. I am going to turn on debugging and try to figure out why.
  • Will certainly look into that once the iPad is out.
  • Mike C
    Curious if you think that the iPad will be able to use the iProxy on an iPhone? I suppose if 1 iPhone can use iProxy on another iPhone that would be a good sign.
  • Joe, I'd say: let's wait until the iPad is out.
  • Joe
    This is a great solution for a laptop. However, with the announcement of the iPad I am interested in providing access to an iPad (or an iPod Touch), which cannot create/host an ad-hoc network. Would it be possible to include creating an ad-hoc network in this app?
  • Hey Pieter, yes - unfortunately iProxy needs to be running on the iPhone.
  • Pieter Lansbergen
    Works very well indeed, thank you.
    Just one silly question: does iProxy have to be alive (running) on the iPhone. I guess yes.

    Greetings from iProxy :-)
  • Jamshid
    Okay I'll give Firefox another try. FYI http://forum.skype.com/lofiver... claims Skype works with http proxies, along with http://davidtse916.wordpress.c.../ claims Skype works with Authoxy (a proxy to a proxy?). Could a .pac (http://www.davidpashley.com/ar...) tell Authoxy to use iProxy (SOCKS), then Skype will use Authoxy? Or for that trouble might as well make iProxy an http proxy?
  • Skype not working does not surprise me. It does some fancy thing it cannot do through a SOCKS proxy. But I can assure you Firefox works just fine. I was always testing with that one. Maybe give it another try.
  • Jamshid
    Thanks this is great! FYI I could not get Skype 2.8 (latest) to work through iProxy on my Snow Leopard macbook. If anyone knows how to make Skype on Mac work with iProxy please post a comment.

    According to this 2008 post Skype for Mac has never worked with SOCKS: http://ahren.org/code/bit/skyp....

    Safari and Chrome work fine, they automatically use the Network => Proxies setting, but I could not get Firefox 3.5 to work even when setting Firefox => Preferences => Advanced => Settings to Manual / SOCKS5.
  • Seems like Firefox does not use the system settings. Go to Preferences > Adanced > Network > Settings to setup the proxy in there. You could use the Firefox profile manager to switch between the proxy/no proxy settings then.
  • Gerd
    Thanks, very good work. Works for me wirth Safari and Mail. And it's even working if you enable the VPN on iPhone, than you have a VPN connection with your Mac and access to the company mail e.g.

    Only drawback for mew is that I didn't get it up with Firefox on the Mac...

    Regards
    GG
  • Hey Randal, the point is that you don't need to jailbreak your phone to do it. When jailbreaking there are plenty of ways to connect your computer to the internet via iPhone.
  • Given that you still need to set up SOCKS, how is this any different from using the existing sshd server on your (jailbroken) phone, then ssh'ing in with a -L 9050 to set up a port 9050 local SOCKS?
  • You go boy! Stick it to the man!
  • Hey, Paul. Not sure I understand your question. Why one would want to analyze the packets? It's just a SOCKS5 proxy passing on the information.

    If you want to analyze try the USB protocol and make http://github.com/st3fan/usbmu... working with 3.1.2 and iTunes9 again :)
  • Hello via iProxy! Thanks for the great app!
  • Paul
    Have you considered, or perhaps something like this already exists, but tunneling the iphone connection through your computer in an effort to analyze the packets with something like Wireshark? thanks.
  • Hi TC!

    Ich denke mal, du wirst schon schnell deinen fame abholen, wenn alle kräftig via twitter deine Kreation weiter tragen. ;) Gut so!
blog comments powered by Disqus