In some private networks, it may not be possible or suitable to expose the firewall outbound rules to "any" IP destination as outlined in About Relay IPs, Ports and Firewall Considerations.
To mitigate this, we recommend the use of secure websockets (wss) as your connection protocol. This will use the address relay.uf.unity3d.com for connecting to the relay service. The host for wss is a URL as necessary for connectivity in browsers and should allow you to continue to use the relay service.
To use WebSockets, you need to be on Unity 2022.2 or later and install version 2.0 of the com.unity.transport package (latest version is 2.0.1). Then, check the “Use WebSockets” checkbox under the Unity Transport component and use “wss” as the connection type when building the Relay server data.