Is it possible to specify the SOCKS proxy for Safari in OS X Lion?
I've got an address and port number I have to fill in there but I can't find the settings in the browser...
No. It is only possible to set the system-wide proxy for a specific connection in System Preferences » Network » (select a connection) » Advanced… » Proxies.
Which is where you are sent when you access Safari » Preferences… » Advanced » Proxies.
The solution is to use a real browser. Chrome and Firefox can both be configured in the way you require and using proxyswitchy or foxyproxy extensions respectively will allow even great control over your particular browser's proxy requirements.
It depends on the use case however.
One use case might be like an average proxy user using proxies based on location or VPN connection or whatever, and wanting everything to use the one proxy set for that matching profile and be able to switch that system wide profile at your leisure.
Another use case is someone wanting to access multiple proxies at once, especially programmatically.
Let's say I want to run two browsers, each using a different proxy. I want Safari to use proxy A when domain matches regular expression X, proxy B when domain matches regular expression Y, and directly connect when domain matches regular expression Z. All the while I only want these browsers using the proxy(ies) and everything else is direct connect.
Advanced level proxy connections are quite easy to achieve using Chrome or Firefox with proxyswitchy or foxyproxy type extensions.
Safari relying solely on a system wide configuration makes it unusable for some people's use cases, mine included. It's frustrating me more and more lately that Apple's software has been trending toward the average mom and pop users and safari is no exception to the rule.
Try networksetup -setwebproxy
usage : networksetup -setwebproxy "Your service name" domain port authentication(on/off) username password
networksetup -setwebproxy "Wi-Fi" localhost 8000 off
The protocol defaults to http, you would have to specify socks:// Username and password only need to be set if your authentication is on.