vADC Forum

Occasional Contributor
Posts: 11
Registered: ‎02-10-2014

Setting up a proxy for ZXTM

I'am setting up a ZXTM reverse proxy (code below) in order to access an external site.

$path = http.getPath(); 

        $contents = resource.get("");

$proxyList = string.split( $contents, "\n" );

foreach( $prop in $proxyList ) {

   if( string.regexMatch( $prop, "(.+)=(.+)Smiley Sad[0-9]+)" )) {        

      $configuredPath = string.trim($1);


      if( string.startsWithI($path, $configuredPath)) {   

         $host = string.unescape(string.trim($2));          

         http.setHeader( "Host", $host);


         $port = string.unescape(string.trim($3));

         pool.use("PROXY", $host, $port);




Here the PROXY pool is a 'dummy' one and I have a file whose entries are of the format


This rule is working fine, however I cannot use this rule because the ZXTM box doesn't have connectivity to this external/public site. Therefore its suggested to use a proxy server ( i.e. for accessing this external site ( along with this rule.)

My question is - is it possible to let ZXTM access a particular URL via a proxy server (To make connection to externalUrl  via - like we enable proxy settings for browsers)? Else is there any workaround?

Posts: 40
Registered: ‎03-26-2013

Re: Setting up a proxy for ZXTM

You want to use another reverse proxy server. It will connect to your actual origin, and you will use it as your ZXTM pool.

Posts: 74
Registered: ‎10-03-2011

Re: Setting up a proxy for ZXTM

Hi Fahim,

If you are pushing everything through a proxy, then you can remove the forward proxy "pool.use(pool, host, port) and replace with pool.use(proxypool). Then specify the proxy(ies) in the pool itself.

You will also need to convert the standard HTTP requests into proxy ones. For example if your request is for "/bar.jsp" and you want to use the external host "" then you should set that in the path with http.setPath(). You might also want to set a proxy-connection header. EG http.setHeader("Proxy-Connection", "Keep-Alive"). The proxy will then do the rest.



Join the Community

Get quick and easy access to valuable resource designed to help you manage your Brocade Network.