8

I am successfully connecting to the internet using an application called tether for a jailbroken iphone. (I know there's better options now).

My iphone is connected to my laptop's wifi "device network".

I have in my OS X network settings a location called iphone and the proxy is configured to use the correct IP and port for the phone.

I can browse the internet using Chrome over http and https perfectly.

iTerm cannot ping google. Git cannot pull. I've googled for days and don't see anything "easy" or that I understand. Any advice is appreciated.

Mostafa
  • 26,886
  • 10
  • 57
  • 52
kinet
  • 1,790
  • 3
  • 20
  • 32

2 Answers2

12

Command-line tools usually only support HTTP proxy. For providing a HTTP proxy out of a SOCKS one you have Privoxy. After you've set up Privoxy you have an HTTP proxy. In terminal usually saying export http_proxy=ip:port is enough for most applications. For Git specifically consult here.

But if that's too much for you, you can use sshuttle. It transparently transfers all your connections through a SOCKS proxy. That is, all the connections in your computer, and after that you don't have to change proxy settings for your GUI apps.

I use Homebrew as my package manager in Mac, and both Privoxy and sshuttle are available in it.

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Mostafa
  • 26,886
  • 10
  • 57
  • 52
0

what I am to do now is export the proxy setting, write the proxy in .zshrc like this:

alias proxy='export all_proxy=socks5://127.0.0.1:7890'

when I want to use the proxy, just run proxy command in iTerm.

Dolphin
  • 29,069
  • 61
  • 260
  • 539