Is there any way that I can set up an HTTP(S) proxy only for Safari? I know I can set up system-wide proxying in the Network System Preference Pane, but I would like to only use proxies in Safari. Is this possible? Thanks in advance.
6 replies
I take the deafening silence to mean that this is not possible. That's too bad.
The System Preferences -> Network settings affect every program that bothers to check them. That's not to say it affects all apps.
For example, Firefox has its own proxy configuration options, so it doesn't matter what the system preferences are set to.
What apps do you want to use without using the proxy?
For example, Firefox has its own proxy configuration options, so it doesn't matter what the system preferences are set to.
What apps do you want to use without using the proxy?
Thanks for the reply.
Well, I use Privoxy, a locally running proxy that can do all kinds of ad-blocking, javascript cleansing, and a whole slew of other things. I also use Little Snitch, a program that monitors attempts at outgoing network connections (to see if programs are trying to phone home, etc.). I set up Privoxy as my HTTP and and HTTPS proxy. I also tell Little Snitch to permanently enable connections from Privoxy on ports 80 and 443 to any hosts. Now, if some random program attempts to phone home using HTTP(S) on port 80, this will go through without warning since it will go through Privoxy. If I were able to only enable the proxy for Safari, the random program would not go through Privoxy, and Little Snitch would warn me.
Hopefully, that made sense. I realize that this sounds a bit paranoid, but hey, I never claimed to be altogether normal 🙂.
I am using Firefox with its own proxy configuration as we speak, and the latest builds of Camino also allow overriding of system proxy preferences. I was mostly just curious if this was possible with Safari.
Well, I use Privoxy, a locally running proxy that can do all kinds of ad-blocking, javascript cleansing, and a whole slew of other things. I also use Little Snitch, a program that monitors attempts at outgoing network connections (to see if programs are trying to phone home, etc.). I set up Privoxy as my HTTP and and HTTPS proxy. I also tell Little Snitch to permanently enable connections from Privoxy on ports 80 and 443 to any hosts. Now, if some random program attempts to phone home using HTTP(S) on port 80, this will go through without warning since it will go through Privoxy. If I were able to only enable the proxy for Safari, the random program would not go through Privoxy, and Little Snitch would warn me.
Hopefully, that made sense. I realize that this sounds a bit paranoid, but hey, I never claimed to be altogether normal 🙂.
I am using Firefox with its own proxy configuration as we speak, and the latest builds of Camino also allow overriding of system proxy preferences. I was mostly just curious if this was possible with Safari.
Completely different issue.
In order to use the system-configured proxies, the app in question has to specifically ask the OS for the proxy config.
In the case of some rogue phone-home app it's likely to try to connect directly, maybe falling back to using a proxy if that fails. On that basis Little Snitch will warn you when the app tries to connect, just as you desire.
The other approach, though, might be to look at it the other way - can Little Snitch detect which apps are trying to connect to Privoxy? that way you could say something like 'privoxy can open any outgoing connections, and these apps can connect to privoxy', thereby closing the loop.
In order to use the system-configured proxies, the app in question has to specifically ask the OS for the proxy config.
In the case of some rogue phone-home app it's likely to try to connect directly, maybe falling back to using a proxy if that fails. On that basis Little Snitch will warn you when the app tries to connect, just as you desire.
The other approach, though, might be to look at it the other way - can Little Snitch detect which apps are trying to connect to Privoxy? that way you could say something like 'privoxy can open any outgoing connections, and these apps can connect to privoxy', thereby closing the loop.
Not being a Mac programmer, I was unaware that apps had to specifically "opt-in" to using the system-configured proxy settings. That is good to know.
I have considered the other approach that you mentioned, but I have heard vague inklings that messing with the localhost/127.0.0.1 settings in Little Snitch can cause trouble, since various system services require access. I am investigating this avenue as well, though I am wary of ending up with an unusable system. I don't think that that would happen, but those are some famous last words 🙂.
Once again, I appreciate your replies.
I have considered the other approach that you mentioned, but I have heard vague inklings that messing with the localhost/127.0.0.1 settings in Little Snitch can cause trouble, since various system services require access. I am investigating this avenue as well, though I am wary of ending up with an unusable system. I don't think that that would happen, but those are some famous last words 🙂.
Once again, I appreciate your replies.
Sorry about hijacking the thread, but could you give me some specific information on how a program (a javascript, to be precise) could ask the system for proxy information? Thanks.
Proxy for only Safari