ThingWorx Model Definition in Composer > System > Using the Proxy Server for the Outbound Request
Using the Proxy Server for the Outbound Request
ThingWorx Platform supports HTTP/HTTPS proxy for most outbound requests. Some areas of the ThingWorx Platform support an explicit proxy, for example, ContentLoaderFunctions. If an explicit proxy is not provided, the ThingWorx Platform uses a proxy configured for the ThingWorx Platform, if any.
* 
Currently explicit proxy is supported only for the ThingWorx Platform. Using proxy support with Solutions like DPM, is currently not supported and may lead to unexpected results.
The ThingWorx Platform proxy feature does not support proxies requiring authentication. Proxy server currently does not support Single Sign-On and ActiveDirectory DirectoryService. To change the proxy support using the JVM seetings, restart the ThingWorx Platform after making the changes.
Configuration
Proxy support uses the underlying support of Java runtime, specified by Java system properties when starting the ThingWorx Platform. Add the Java system properties as -Dkey=value to Apache Tomcat. The location to add the properties varies by the installed operating system. Several proxy properties can be configured, depending on the specific proxy setup required. For more information, see Java documentation.
HTTP/HTTPS Proxy
The ThingWorx Platform uses the configured HTTP proxy when requesting HTTP resources. The Java system properties http.proxyHost and http.proxyPort defines the host and port, respectively. http.nonProxyHosts is specified to include any resources that must not go through the proxy. It is useful to have internal-only resources that the ThingWorx Platform needs to access. Separate the values using pipe (|). The default value of http.nonProxyHosts includes all variants that are used to access the local system (localhost|127.*|[::1]). Provide the default values along with any custom values you need to add.
ThingWorx Platform uses the configured HTTPS proxy when requesting HTTPS resources. The Java system properties https.proxyHost and https.proxyPort define the host and port, respectively. HTTPS proxy uses the same list of non-proxy hosts as HTTP (http.nonProxyHosts).
* 
PTC highly recommends using https proxy.
Using the Host Proxy Settings
The Java runtime also allows using the proxy setting defined on the host rather than directly configuring HTTP/HTTPS proxies. To enable proxy configurations in the operating system settings, under CATALINA_OPTS, set the Java system property java.net.useSystemProxies to true. The operating system settings enable complex proxy setups, relying on Proxy Auto-Config (PAC) files and Web Proxy Auto-Discovery (WPAD), which may be in use on the host system.
If the ThingWorx Platform is configured to use host proxy settings then the proxy can change at runtime.
Using the Host Proxy Settings for Containers
A container running in a docker or Kubernetes environment has no visibility to the actual host system. Therefore, using the host proxy settings may not function as intended. If a container requires an outbound proxy, it must be configured directly via the HTTP/HTTPS proxy properties for Apache Tomcat. Use the CATALINA_OPTS environment variable to configure those Java system properties.
Was this helpful?