Live data from Hacker News

Tether Launches HTML5-Based iPhone Tethering Solution

macrumors.com

51–60 of 64 posts

Re: Tether Launches HTML5-Based iPhone Tethering Solution

#51

Earlier quoted context omitted.

when the carriers and handset manufacturers pull their collective thumbs out of their asses.

Is that what had to happen for Apple to do it? I thought Android was on the same carriers?

god dammit, why does everything have to be an apple/android battle? can we not complain about the deficiencies of android without some smug apple fanboys chiming in? yes, apple is better at pushing out software updates than android is. that's not relevant to a discussion on where we can and can't use websockets. now go away.

Re: Tether Launches HTML5-Based iPhone Tethering Solution

#52
post #31

Too bad Android does not have any visible plans to implement WebSocket (which is now RFC 6455). Perhaps the development of HTML5 apps on Android has lower priority for Google than for Apple, to force the development effort into native, which they can curate and control. This hypothesis is also corroborated by comparing HTML5 performance in Android and in iOS (Android is usually 300-500% slower).

Opera Mobile supports Web Sockets and runs on almost any Android device.

http://caniuse.com/#feat=websockets

Re: Tether Launches HTML5-Based iPhone Tethering Solution

#54
post #5

Ok so I went ahead and bought the service. Here's what I found out: You'll have to keep the tether client application running on your Mac or PC. So not gonna work for wifi-only iPads. Then you will need to keep the html5 webpage open in order to receive data. They instruct you to set iPhone's screen lock to "never" so it doesn't automatically shuts the web page down in 1 minute or so. So I imagine you can't take phon…

Interesting that iOS shuts down the connection when the browser is closed or the phone locked. Is is the same with SocketIO? On Android the connection remains open as long as the browser has the tab open.

Re: Tether Launches HTML5-Based iPhone Tethering Solution

#55
post #36

This is based on speculation and guesswork ... but this is what I think they were doing with their original iTether application: On the client (the Mac) they have a IOKit ethernet driver that shows up in Network Settings. This becomes your default route (after some fake DHCP magic) and then captures packets and relays them to their application that runs in userland. Their userland application contains a lightweight T…

That's basically the way to make such apps.

However, for this particular service, I think that you could get away with much less by leveraging existing work: modify an OpenVPN client so that it has an additional listen socket; then, use a websockets-based relay to link the OpenVPN client's listen socket and your OpenVPN servers.

A nice thing about this setup is that the webpage with the websockets relay can be dynamically generated and point to any server of your choice for quick load-balancing; it would also make it difficult for carriers to block any single server. The biggest problem would be scaling, since OpenVPN might load a server with just hundreds of active clients (http://forums.openvpn.net/topic9148.html), in which case a custom solution might be better...

Regardless of how they did it, very clever workaround!

Re: Tether Launches HTML5-Based iPhone Tethering Solution

#56

Do US carriers really still restrict tethering? That's really a shame, because the iPhone's built in tethering support is very good, and extremely elegant compared to apps and methods like this one...

I found the exact same thing, especially since they (finally) implemented the Access Point "tethering", it drains more battery but is incredibly convenient and simple to setup.

Once upon a time, I used the very first iPhone proxy application (NetShare), it was significantly more fiddly than native support. And of course you couldn't use the phone while it proxied, that's not an issue with native support.

Re: Tether Launches HTML5-Based iPhone Tethering Solution

#57
I feel like this is not so hard to do with NodeJS and Web sockets.

Small NodeJS app that serves the client connection webpage and acts as a proxy. Set the proxy locally, When you get requests instead of fetching them ask the socket for the data and headers.

On the client just do an XMLHttpRequest for whatever and shove it back down the web socket to the proxy server. Done, Right? I'll do a little experiment when i have time...

Re: Tether Launches HTML5-Based iPhone Tethering Solution

#59
More fundamental than the "do they use websockets" question is "what is the multihoming behavior of iOS?"

Sockets alone are not enough -- you need cooperation from the OS to route connections over both wifi and cell data links in the desired fashion.

In this case we can infer it's two connections made by a script running on a web page: one with the "tethered" machine (over wifi) and one with Tether's proxy server (over cell data). The proxy server works in concert with a client on the tethered machine, and the script just relays data between those two connections.

The interesting thing is that iOS permits a single web page to connect over both network links simultaneously. I'm no expert but that seems like something Apple could, and would, kill with an update.

Really clever hack, though.

Re: Tether Launches HTML5-Based iPhone Tethering Solution

#60

Earlier quoted context omitted.

Is that what had to happen for Apple to do it? I thought Android was on the same carriers?

god dammit, why does everything have to be an apple/android battle? can we not complain about the deficiencies of android without some smug apple fanboys chiming in? yes, apple is better at pushing out software updates than android is. that's not relevant to a discussion on where we can and can't use websockets. now go away.

Just trying to lay the blame where it belongs, on Google and the Android ecosystem. You'd have your websockets if Google did the right thing and enforced updates. Has nothing at all to do with the carriers .
Post reply on HN