Routing requests through a proxy
Send requests directly, through the system proxy or through an HTTP or SOCKS5 proxy.
Overview
By default, Relay uses the proxy set in System Settings, like other Mac apps. You can instead have every request connect directly, or send requests through a proxy of your own, such as a debugging proxy on your Mac or a corporate HTTP or SOCKS5 proxy.
The proxy applies to everything Relay sends: requests, WebSocket connections, requests from scripts, OAuth 2.0 token requests and GraphQL schema requests, and the files Relay downloads when you import an API from a URL. A workspace, collection, folder or request can turn the proxy off for its requests.
Choose a proxy
- Choose Relay > Settings, then click Network.
- In the Proxy section, choose an option from the Proxy menu:
- System Settings: Use the proxy set in System Settings > Network, including automatic proxy configuration. This is the default.
- No Proxy: Connect directly, even when System Settings sets a proxy.
- Custom: Send every request through the proxy you set below.
You can also choose these settings in the Workspaces window: select Globals, then click Settings (the gear button).
Set up a custom proxy
When you choose Custom, fill in the proxy's details:
- Type: HTTP or SOCKS5. An HTTP proxy tunnels both
http://andhttps://requests. - Server: The proxy's host, such as
proxy.example.com, and its port. The default port is 8080. - Username: The user name, if the proxy requires one.
- Password: The password. Relay keeps it in your keychain, not in its settings. The field is available once you enter a username.
- Bypass Proxy For: Hosts that connect directly, separated by commas, such as
localhost, *.internal.example.com.
Requests to a loopback address, such as 127.0.0.1, always connect directly.
If you choose Custom without entering a server, requests fail with a message that the proxy in Settings > Network needs a host and a port.
Connect some requests directly
To keep a group of requests or a single request off the proxy, set Use Proxy to Off in its Settings tab:
- Open the level's settings:
- For a request, click Settings (the gear button) in the request editor, or press Command-7.
- For a collection or folder, Control-click it in the sidebar, choose Edit Variables…, then click Settings (the gear button) in the Collection Settings window.
- For a workspace, click the workspace menu, choose Edit Workspaces…, select the workspace and click Settings (the gear button).
- In the Connection card, set Use Proxy to Off.
Those requests connect directly, without the custom proxy or the one in System Settings.
Check which proxy a request used
When a request goes through a custom proxy, the response inspector's Headers tab says so under Request Headers, such as "Through HTTP proxy proxy.example.com:8080".
See Also
- Configuring request settings: Set the timeout, redirect behavior, proxy and certificate checks for a request or a group of requests.
- Using client and CA certificates: Present client certificates and trust your own certificate authorities.
- Configuring Relay settings: Change Relay's defaults for requests, networking, history, code export and the MCP server.