Skip to Content

Slack Desktop app behind a SOCK proxy on macOS

Are you behind a company network (or VPN) that restricts access to Slack? Or does the company force you to install a custom root certificate in order for you to log into a certain Slack team using SSO? Here's a solution for you..

First of all, you need a server that is outside of the restricted company network. Create a SOCK proxy to that server using SSH and keep the connection open:

ssh -D 8000 [username]@[server]

  1. Go to System Preferences
  2. Select your network interface (most probably WIFI or Wired connection)
  3. Click on Advanced..
  4. Click on Proxies tab
  5. Select and check off Automatic Proxy Configuration
  6. Paste in this URL: (you can see the content of the file below)
  7. Hit OK and Apply the changes
Applying proxy.pac configuration file hosted on Github on macOS

Note: The proxy.pac file must be served from http[s]. Local files don't work on recent macOS systems, since file:// URLs are sandboxed. Use Github :)

function FindProxyForURL(url, host) {

if (shExpMatch(host, "*")) {
// Use SOCK proxy,
// or fall back to a DIRECT traffic.
// ssh -D 8000 [user]@[server]
return "SOCKS; DIRECT";

return "DIRECT";

Here you go. Slack is working again. Enjoy!

Proxy.pac files on Github:


Join in on the conversation with Vojtech Vitek when you subscribe to Vojtech's IT Blog.