Configuring a proxy
Introduction
When deploying Browsolate, you can configure a proxy server to route all traffic through an external network. This is particularly useful for enhancing security, anonymity, or enforcing network policies.
The proxy configuration is passed through the Proxy parameter from the AWS Marketplace installer or the the CloudFormation template.
Proxy Parameter Format
The format of the Proxy parameter follows standard URL syntax. It supports various types of proxy servers, including HTTP, HTTPS, and SOCKS (SOCKS4 and SOCKS5). Authentication can also be included in the URL if required.
Example Formats:
-
HTTP / HTTPS Proxy:
http://proxy.example.com:8080 https://proxy.example.com:443 https://username:password@proxy.example.com:443
-
SOCKS4 / SOCKS5 Proxy:
socks4://proxy.example.com:1080 socks5://proxy.example.com:1080 socks5://username:password@proxy.example.com:1080
In this format:
username
andpassword
are your proxy authentication credentials (if required).proxy.example.com
is the hostname or IP address of your proxy server.8080
,443
, and1080
are the ports that the proxy server is listening on.
Custom Request Headers
In addition to proxy configuration, Browsolate allows the addition of custom headers at runtime through the customRequestHeaders field in the URL JSON configuration. This feature provides flexibility in injecting headers into requests, giving fine-grained control over how requests are handled by an upstream proxy.
Example
To include a custom header, modify the customRequestHeaders field in the URL configuration:
{
"url": "https://example.com",
"customRequestHeaders": {
"X-Custom-Header1": "custom-value1",
"X-Proxy-Username": "protected@mycompany.com"
}
}