# Connect your proxy Use your connection details with HTTP CONNECT or SOCKS5. ## Get your connection details Open a ready static resource or dynamic connection in your workspace. Copy the host, port, username and password for the protocol you want to use. With the API, read `GET /proxies/{id}` or `GET /dynamic/profiles/{id}`. Your key needs `credentials:read` as well as the endpoint's proxy scope. Detail responses provide connection secrets when your key has the required permissions. ## HTTP and HTTPS destinations Set the four `PROXY_` variables to your connection details. HTTP proxies can carry HTTPS requests using CONNECT: ```sh curl --proxy "http://$PROXY_HOST:$PROXY_PORT" \ --proxy-user "$PROXY_USERNAME:$PROXY_PASSWORD" \ --max-time 20 https://example.com/ ``` The proxy URL uses `http://`; your destination can still use `https://`. ## SOCKS5 Use `socks5h` when the proxy should resolve the destination hostname: ```sh curl --proxy "socks5h://$PROXY_HOST:$PROXY_PORT" \ --proxy-user "$PROXY_USERNAME:$PROXY_PASSWORD" \ --max-time 20 https://example.com/ ``` Choose a protocol supported by that connection. All supported protocols share the same traffic balance. ## If a connection fails Check that the resource is ready, the host and port match the selected protocol, and the credentials are current. Static resources must be active. Dynamic connections need standard traffic; optimized dynamic connections also need optimization traffic. Keep passwords out of screenshots and logs. For help, provide the resource or connection ID and the time of the failed request.