B Proxy Command Line Reference

This appendix lists the parameters for running OpenScript proxy from the command line. This is an HTTP/HTTPS proxy that may be used for inspecting HTTP traffic originating from clients such as web browsers and Java applets. It is not intended to be used for heavy traffic loads from more than a few browsers. After running the proxy, configure your clients proxy settings to redirect traffic to this proxy which, by default, is running on localhost:7777.

To run the proxy from the command line, type:

[OpenScript Install Dir]/proxy.bat [options]

[options] may consist of any number of proxy command line settings. All Arguments are optional and are case-insensitive.

B.1 Specifying Command Line Settings

This section describes how to use the proxy command line settings.

  • Zero or more proxy command line settings may be specified using the following format:

    -settingId settingValue

    Example 1: Run the proxy listening on port 7777 and log a CSV file of all trafic it captures.

    proxy.bat -logCSV -logDir C:\Temp\ProxyLogOutput 

    Example 2: Log all HTTP/S traffic except JavaScript and CSS files.

    proxy.bat -logCSV -logDir "C:\Temp\ProxyLogOutput" -excludeRegexp (.+?)js;(.+?)css 

    Example 3: Run the proxy and route all requests to another proxy except for requests to the hosts called "test-server.com" and "production-server.com".

    proxy.bat -chainproxy corporateProxy.us.corp.com:7777 -chainProxyNonProxyHosts test-server.com;production-server.com 
  • If many settings are required, use the -propertiesPath setting to specify a file containing a larger number of properties. See the -propertiesPath setting in the General Settings for additional information.

B.2 Supported Proxy Command Line Settings

This section lists the command line settings that can be used with the proxy.

B.2.1 General Settings

The following table lists the General proxy command line settings.

Setting Description
-acceptEncodingHeader [gzip, deflate] Overrides the outgoing client HTTP request header value for "Accept Encoding". If no value is specified, then the "Accept Encoding" header is stripped from the outgoing request. Default value is "gzip, deflate".

Example usage:

-acceptEncodingHeader gzip

-bindIp [ip] Specify a specific local IP address to bind. Use this when connecting through a VPN and the proxy auto-detects the wrong local address to bind.

Example usage:


-debug Turn on debug log messages.

Example usage:


-handleEncodedResponse true|false Instructs the proxy to attempt to decode/uncompress response contents in gzip or deflate format. The proxy de-compresses contents before logging them or returning them to the client browser. The default is true.

Example usage:

-handleEncodedResponse false

-httpPort [Port Number] Specify the port on which the proxy will listen for traffic. The default proxy listening port if none specified is 7777.

Example usage:

-httpPort 7898

-propertiesPath path Specify the file path to a properties file listing all of the applicable proxy start-up Command Line Arguments in name=value pair format. If used it is presumed all arguments will be inside the file rather than directly on the command line.

Example usage:

-propertiesPath C:/proxyStartup.properties
-replace "serverUrl=localFilePath" When serverUrl is downloaded, replace its contents with the contents from the local File located at the localFilePath. This is used to inject a different response content into the browser than what the server would normally return.

Example usage:

-replace "test.server.com\mocApp.htm = C:\Temp\Replacement\mocApp.htm,http://production.com = C:\Temp\Replacement\testFile.txt"

-SSLVersion [TLS | SSL] Specify the SSL version to be used by the proxy while running. The default is TLS.

Example usage:

-sslversion SSL

-timeout[milliseconds] Specify how long the proxy should wait on a connection before timing out waiting for a response. The default is 120000ms.

Example usage:

-timeout 200000

B.2.2 Chain Proxy Settings

The following table lists the Chain Proxy command line settings.

Setting Description
-chainproxy "hostname,portNumber" Specify a second proxy host name or IP address and port through which to tunnel captured traffic.

Example usage:

-chainproxy "corporateproxy,80"

-chainProxyAuthenticate Flag argument, required if the proxy specified in the argument -chainProxy requires authentication. If specified, you will be prompted for username and password information directly before the proxy initiates.

Example usage:

-chainproxy "authenticatedHost,7721" -chainproxyAuthenticate

-chainProxyNonProxyHosts [hostname1;hostname2] Specify one or more web server host names or IP addresses, delimited by a semi-colon (;), for which traffic should not be directed through to the proxy specified by -chainproxy. Requests and responses will bypass the chained proxy and go directly to the host.

Example usage:

-chainProxyNonProxyHosts "test-server.com;production-server.com"

B.2.3 Logging Settings

The following tables list the proxy logging command line settings.

Setting Description
-logDir [filepath] Specify a local directory in which to log traffic. Used in conjunction with other logging settings.

Example usage:

-logDir "C:\temp\log1" -logCSV 
-logCSV Log the traffic to a CSV file in the directory specified by the "-logDir" argument.

Example usage:

-logDir "C:\temp\log1" -logCSV
-logXML Log the traffic to an XML file in the directory specified by the "-logDir" argument.

Example usage:

-logDir "C:\temp\log1" -logXML

-logHeadersOnly When logging content using the other logging arguments, only log headers. Response headers are not logged.

Example usage:

-logDir "C:\temp\log1" -logCSV -logHeadersOnly

-logImages true|false Specify whether or not to log image file responses to the file specified by the -logDir argument. Used in conjunction with other -log arguments. Disabled by default, no images are logged.

Example usage:

-logDir "C:\temp\log1" -logCSV -logImages true

-preExclude [URL SubString; URL Substring] Exclude URLs that contain a value matching any substring provided in the semi-colon (;) delimited list.

Example usage:

-preexclude testserver;oracle.com

-exclude [contenttype1;contenttype2] Exclude HTTP responses with the specified Content-type headers when logging traffic.

Example usage:

-exclude text/javascript;text/html

-excludeRegexp [RegExp1;RegExp2] Exclude HTTP requests whose URLs match the given regular expressions when logging traffic.

Example usage:

-excludeRegexp (.+?)js;(.+?)css

B.2.4 Security Settings

The following table lists the proxy security command line settings.

Setting Description
-allowedClients [IP1;IP2;IP3] Specify if the proxy will accept requests from clients/browsers running on different machines. Default value is local addresses only ";localhost;0:0:0:0:0:0:0:1"; the proxy only accepts requests from clients browsers running on the local machine.
-clientCertificate [file] Client certificate in pem format.