Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

How do we support multiple proxy servers?



Customer has multiple connectors and currently the connector calls are going through a single proxy server (with jvm settings http.proxyHost and http.proxyPort). They want to know if it is possible to configure PRPC to go through different proxies server based on certain criteria.

Error Messages

Not Applicable 

Steps to Reproduce

Configure more than one connectors and have each connector go through its own proxy server.

Root Cause

Need a solution to work with multi proxies from 1 JVM for http connector.


Recommend customer to try out the changes below in step 12 of pyInovkeRESTConnector,
    // Execute the HTTP Call
    com.pega.apache.http.HttpResponse httpResponse = null;
        // Execute the method.
        // new proxy selector
        class MyProxySelector extends {
       defsel = null;
           public MyProxySelector( def) {
               oLog.infoForced("selector constructor...");
                defsel = def;
        public java.util.List<> select( uri) {
          oLog.infoForced("inside select....");
          List<> ret = new java.util.ArrayList<>();
          List<> proxyList = new java.util.ArrayList<>();
           // below is just example (setting different proxies based on protocol) but you should modify according to your requirement
          if ("http".equalsIgnoreCase(uri.getScheme())) {
   proxyAddress1 = new"localhost", 8888);
            proxyList.add(new, proxyAddress1));
          ret = proxyList;
          } else if("https".equalsIgnoreCase(uri.getScheme())) {
   proxyAddress2 = new"localhost", 9999);
            proxyList.add(new, proxyAddress2));
          ret = proxyList;           
          return ret;
         public void connectFailed( uri, sa, ioe) {
           oLog.infoForced("inside connectFailed...");
        // don't need to check type of httpRequest here...
        httpResponse = client.execute(httpRequest, (com.pega.apache.http.protocol.BasicHttpContext)localContext);

Published March 4, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us