Skip to content

Working with Proxy Servers

Billie Simmons edited this page Feb 7, 2025 · 1 revision

Working with Proxy Servers in Zowe Explorer

User setup

z/OSMF profile types are supported out of the box, please check with extenders that introduce new profile types for z/OS connections for added support.

Environment Variables

For proxy use across Zowe Explorer and Zowe CLI are best set as environment variables to be picked up by both client programs. Environment variables checked and used for proxy support include:

  • HTTPS_PROXY
  • HTTP_PROXY
  • NO_PROXY

VS Code Settings

Users working in only the VS Code space can make use of the VS Code proxy settings. Open the VS Code settings GUI and search proxy to view and edit the different proxy settings offered by VS Code and other extensions. The first setting to be aware of when connecting using a proxy with Zowe Explorer will be http.proxySupport, this will need to be set to on for Zowe Explorer to consider the other proxy settings. Once proxy support is turned on the following settings can be updated for use with Zowe Explorer.

  • http.noProxy
  • http.proxy
  • http.proxyAuthorization
  • http.proxyStrictSSL

Extender adoption

Extenders will want to call ProfilesCache.getProfileSessionWithVscProxy(session) within their Zowe Explorer API file methods getSessionFromCommandArgument() && getSession() after preparing session as normal. Calling this will add the VS Code Proxy values as part of the Session to be used with the rest request, ISession.proxy.

Example of getSessionFromCommandArguments() from ZoweExplorerZosmfApi.ts.

const sessCfg = zosmf.ZosmfSession.createSessCfgFromArgs(cmdArgs);
imperative.ConnectionPropsForSessCfg.resolveSessCfgProps(sessCfg, cmdArgs);
const sessionToUse = new imperative.Session(sessCfg);
return ProfilesCache.getProfileSessionWithVscProxy(sessionToUse);

For extenders that use the existing Zowe SDK for preparing and making the rest calls, this is all that is required to add the proxy support for thier profile type in Zowe Explorer. Extenders that are handling their own rest calls can use the Zowe imperative SDK ProxySettings methods to prepare the proxy agent.

Clone this wiki locally