If you have a network architecture that requires internet traffic to flow through a proxy server, this guide will help you ensure that Prefix can communicate out through your proxy server seamlessly.
Configuring the proxy is done by creating a file in the agent's folder (C:\Program Files (x86)\Stackify Prefix by default) called CustomAgent.config. Below is an example of how to populate the .config file (you can create a file and just paste this directly into it):
<?xml version="1.0" encoding="utf-8" ?> <appSettings> <!-- To force the agent to use a proxy server, set it here --> <add key="ProxyServer" value="http://proxy_server_address:port" /> </appSettings>
There are two options for implementing this custom configuration you can use either, so choose the approach that you’re most comfortable with or that will be most convenient.
1. First install the agent, and then create the CustomAgent.config file as described above in the agent’s folder. Once this is complete, restart the Stackify Prefix so that it will pick up the new file and start routing traffic through the proxy. Installing using this method will allow traffic to flow around the proxy server until you install the CustomAgent.config file and restart the agent.
2. First create the folder where you will be installing the Stackify agent (C:\Program Files (x86)\Stackify by default), create the CustomAgent.config file in the folder, and then install in the usual manner. This will ensure that from the very first communication the agent picks up the proxy configuration and routes traffic appropriately.
Providing Authentication for Proxies
There are two options available for using a proxy with authentication:
Option 1: Put the username and password in the config file:
<?xml version="1.0" encoding="utf-8" ?> <appSettings> <add key="ProxyServer" value="http://username:password@proxy_server_address:port" /> </appSettings>
Option 2: Use Windows Authentication of the running windows service under a specific user account for the service:
Change your config as shown and go to Windows Services and change "Stackify Prefix" to use "Log On" as a different user.
<?xml version="1.0" encoding="utf-8" ?> <appSettings> <add key="ProxyServer" value="http://proxy_server_address:port" /> <add key="ProxyUseDefaultCredentials" value="true" /> </appSettings>