Safari ignores proxy settings for websockets

Using macOS Monterey 12.3.1 and Safari 15.4 (17613.1.17.1.13), I have a HTTP/HTTPS proxy configured in network settings for the active network adapter. In Safari the proxy is correctly used for all requests except websockets. Safari will try to use a direct connection for wss:// links. Other browsers like Chrome and Firefox work as expected with the same proxy settings and websocket requests there go through the proxy as well.

Is there anything special that needs to be configured in Safari for WS communication to be routed through a proxy server?

MacBook Pro 14″, macOS 12.3

Posted on May 10, 2022 1:35 AM

Reply

Similar questions

3 replies

May 11, 2022 11:10 PM in response to tgok23


My proxy server is properly set and is working correctly (same settings for HTTP and HTTPS). I have tested in Chrome, Firefox, Safari. Websites and websockets work as expected in Chrome and Firefox (the connection goes through the proxy server). Only websites work in Safari - the websockets connections (URLs starting with wss://) are not going through the proxy server and with Chrome and Firefox they do. Safari is trying to use a direct connection for websockets, which is different from other web browsers and which is why I am asking for help.

May 11, 2022 7:00 AM in response to lini_

Hello lini_,



Let's see if the information included in this guide helps out: Set up a proxy server using Safari on Mac. We wanted to highlight this specific information:

"Your administrator should tell you the type of proxy server to specify, the IP address or host name, and a port number."

Once you have this information, use the steps included in order to change the proxy server settings for Safari. By doing this, it should help you get connected.


Take care.

May 12, 2022 6:21 AM in response to lini_

lini_,


Thanks for the confirmation. Do you currently have any Safari extensions set? If so, is it possible that one of those is causing this behavior? Check out how to manage your extensions here: Get extensions to customize Safari on Mac - Apple Support


Manage your extensions
1. In the Safari app  on your Mac, choose Safari > Preferences, then click Extensions.
2. Do any of the following:
* Turn an extension on or off: Select or deselect the extension’s checkbox.
* Note: You get a warning if you turn on an extension that slows down browsing.
* Change an extension’s settings: Select the extension, then select or deselect settings.
* Remove an extension: Select the extension, then click Uninstall. Or, delete the app that contains the extension.


If you are not able to locate anything that would cause this in your extensions, it may be best to Contact Apple Support so they can look into this a bit further with you.


Have a great day!



This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Safari ignores proxy settings for websockets

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.