Using PCF Dev Behind a Proxy
Page last updated:
This topic describes how to use PCF Dev with a proxy.
In a restricted network environment, configuring PCF Dev to connect to an HTTP proxy permits app-to-Internet connectivity, access to custom buildpacks, and the use of Docker images from the public Internet.
To run PCF Dev behind a proxy, set the standard proxy environment variables for your platform before you start PCF Dev:
Note: Proxy Support is not currently supported on Linux. That means the environment variables `HTTP_PROXY, HTTPS_PROXY, NO_PROXY`, are not fully supported. Proxy Support on Linux is only supported in PCF Dev v0.30 or earlier.* Using Mac OS X:
$ HTTP\_PROXY=http://PROXY\_IP:PROXY\_PORT \ > HTTPS\_PROXY=http://PROXY\_IP:PROXY\_PORT \ > cf dev start* Using Windows PowerShell:
>> $env:HTTP\_PROXY = "http://PROXY\_IP:PROXY\_PORT" >> $env:HTTPS\_PROXY = "http://PROXY\_IP:PROXY\_PORT" >> cf dev start
Do not use
PROXY_IP or as the proxy server hostname, because
localhost refers to the PCF Dev VM itself.
If PCF Dev needs to use a locally-running HTTP proxy, the proxy must be listening on all network interfaces, and you must address it as
host.cfdev.sh. For a system domain
dev.cfdev.sh, address the proxy as
host.cfdev.sh, and so on.
You must configure the cf CLI to bypass your HTTP proxy for addresses that end in
local.pcfdev.io, which is your system domain:
- For Mac OS X:
$ export NO_PROXY=.dev.cfdev.sh,dev.cfdev.sh,$NO_PROXY $ cf login -a https://api.dev.cfdev.sh --skip-ssl-validation
- For Windows PowerShell:
>> $env:NO_PROXY = ".dev.cfdev.sh,dev.cfdev.sh,OTHER-DOMAINS" >> cf login -a https://api.ldev.cfdev.sh --skip-ssl-validation
You can configure your apps to connect to other addresses without using the proxy. For example, you can connect apps to user-provided services on a private network.
- Set the
NO_PROXYenvironment variable to a comma-separated list of hosts:
$ cf set-env APP_NAME NO_PROXY=192.0.2.54,198.51.100.34