Closed dwieringa closed 9 years ago
That's interesting. Please let me know if it works.
I just tested it and it works.
I created a file called socks.pac in a temp folder on my MacBook. The contents were:
function FindProxyForURL(url, host) {
return "SOCKS 10.10.10.2:3128";
}
Next I started an http server on my MacBook in that same temp directory using:
python -m SimpleHTTPServer 8000
I then setup the network using my HooToo TripMate Nano HT-TM02. iPhone 6 had IP of 10.10.10.2 and ran this tethering app. MacBook with HTTP serve had IP of 10.10.10.1.
I connected an iPad to same network and let it get a DHCP address on the same subnet (10.10.10.*) but made sure it didn't collide with iPhone or MacBook. DNS was 10.10.10.2 (assigned by DHCP server in HooToo). I set HTTP PROXY setting to Auto and set URL to http://10.10.10.1:8000/socks.pac. After this I was able to see the request for socks.pac on my MacBook. iPad was able to browse the internet via Safari and Chrome. Unfortunately Clash of Clans didn't work. :)
If a small HTTP server is added to tethering app that serves socks.pac then the iPads can be configured to point to the iPhone instead of my MacBook-based HTTP server. I found a few HTTP servers available via Cocoa Pods and also glanced at the iProxy code, but I don't have time to implement this right now.
@dwieringa Adding full-fledged http server seems an overkill. What it achieves is to sending socks.pac file regardless of what client requests.
iProxy served different files for the HTTP proxy vs the SOCKS proxy (see image below). I realize this project doesn't have an HTTP proxy at the moment, but something to consider if it might ever be added.
One possible reason for an HTTP proxy is the iOS OpenVPN client doesn't currently support SOCKS proxy. If this tethering tool supported HTTP proxy, I think you could setup OpenVPN on iPads using HTTP proxy and then have full internet support. This would require an VPN server to connect to, but they are out there (http://www.vpngate.net/en/).
iProxy interface for reference:
Unfortunately, I don't have time to tinker with this currently.
is this project active? a simple http server to serve a pac file can be achieved with this open source library: http://www.cocoawithlove.com/2009/07/simple-extensible-http-server-in-cocoa.html
@redgreenbluee You are welcome to open a pull request for this feature.
@redgreenbluee This feature is added in v1.4 release.
@rickyzhang82 How do we use the iPad feature 1:1 from iPhone to iPad? Is there any directions? Thank you
Buy a portable router and then follow bullet point 5 in https://github.com/rickyzhang82/tethering/wiki
@rickyzhang82 Thank you, I really appreciate your work this is great!
On the "What Is Next" section of the wiki you state "Add HTTP proxy. This is for iPad device which only support HTTP proxy."
In my research today, I stumbled on these two references:
This makes it sound like if this app can serve a simple .pac file, then iPads can point to that pac file and be configured for the SOCKS proxy.
From what I've seen, iProxy already has this built in (in case you're interested to go see how). iProxy however is no longer maintained.