Proxy Server commands (CLI)

Options

Note: We strongly recommend using the REST API rather than the CLI whenever practical (see Proxy Server API commands).
CLI usage: java -jar DastProxy.jar [options] [command]
Option Short Option Description
-exportCertificate <output_path> -ec Exports the self-signed root certificate as a PEM file.
-generateNewRootCertificate -gnrc Generates a new self-signed root certificate, the default value is false.
-generateRootCertificateIfNeeded -gnrcin Generates a new self-signed root certificate only if none exists. Default value = False.
-importRootCertificate <certificate_path> -irc Imports the selected PFX or P12 certificate as proxy’s root certificate.
-importRootCertificatePassword <password> -ircp Password for selected root certificate.
-help -h Displays command usage. Default value = False.

There are five commands, as described below.

"start"

Starts the proxy. Usage: start [options]
Option Short option Description
-chainedProxy <host_or_ip:port> -cp Configure the upstream (chained) proxy using format [ip]:[port]. This will override the chained proxy rules file (proxy.chain).
-chainedProxyFile <file_path> -cpf Path for the chained proxy rules file.
-clientCertificateFile <file_path> -ccf Sets the path for the Key Store holding the client certificate (PFX or JKS).
-clientCertificatePassword <password> -ccp Password for the Client Certificate KeyStore (if not provided, will be read from standard input).
-port <port_number> -p Set proxy port. Default = 0 which selects a random port.
-proxyCertificateFile <file_path> -pcf Sets the path for the Key Store holding the proxy server certificate (PFX or JKS)
-proxyCertificatePassword <password> -pcp Password for the Proxy Certificate KeyStore (if not provided, will be read from standard input).
-saveDastConfigFile <dast.config_output_path> -sdcf Saves a DAST.CONFIG file with the recorded traffic.
-saveDastConfigFileToFolder <dast.config_output_folder_path> -sdcftf Saves a DAST.CONFIG file with the recorded traffic to the selected folder.
-saveHarFile <har_output_path> -shf Saves the recorded traffic as a HAR file.

"stop"

Stops the proxy. Usage: stop [options]
Option Short option Description
-port <port_number> -p The port of the proxy you want to stop. Default = 0
Important: Setting the port number to "0" does not stop all open proxies. Use the stopall command to do this.

"stopall"

Stops all open proxies. Usage: stopall

"encrypt"

Upload file for encryption. Usage: encrypt [options]
Option Short option Description
-dastConfigFile <file path> -dcf The path to the DAST.CONFIG file to be encrypted.
-outputFileName -ofn The name for the encrypted DAST.CONFIG file.

"validate"

Validate the proxy configuration file. Usage: validate [options]
Option Short option Description
-chainedProxyFile <file_path> -cpf Path for the chained proxy rules file.
-test <scheme>://<hostname>[:port] <file_path> -t Tests the URL against the chained proxy rules and returns all rules that match it.
-verbose -v Triggers a printout of all transformed patterns. Default = False.