Configuring Proxy Connections

You can configure the connector to connect through an HTTP or SOCKS proxy server instead of connecting directly to the Presto service. When connecting through a proxy server, the connector supports basic authentication.

You provide the configuration information to the connector in the connection URL. For more information about the syntax of the connection URL, see Building the Connection URL.

To configure an HTTP proxy connection:

  1. Set the UseProxy property to 1.
  2. Set the ProxyHost property to the IP address or host name of your proxy server.
  3. Set the ProxyPort property to the number of the TCP port that the proxy server uses to listen for client connections.
  4. If the proxy server requires authentication, do the following:
    1. Set the ProxyAuth property to 1.
    2. Set the ProxyUID property to your user name for accessing the server.
    3. Set the ProxyPWD property to your password for accessing the server.

For example, the following connection URL uses an HTTP proxy server with authentication:

jdbc:presto://192.168.203.141:8080;UseProxy=1;ProxyHost=192.168.55.3;ProxyPort=189;ProyAuth=1;ProxyUID=skroob;ProxyPWD=12345

To configure a SOCKS proxy connection:

  1. Set the UseProxy and ProxyType properties to 1.
  2. Set the ProxyHost property to the IP address or host name of your proxy server.
  3. Set the ProxyPort property to the number of the TCP port that the proxy server uses to listen for client connections.

For example, the following connection URL uses a SOCKS proxy server with authentication:

jdbc:presto://192.168.203.123:8080;UseProxy=1;ProxyType=1;ProxyHost=localhost;ProxyPort=8754