forked from pivotal-cf/docs-pcf-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
proxy.html.md.erb
54 lines (43 loc) · 2.37 KB
/
proxy.html.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
---
breadcrumb: PCF Dev Documentation
title: Using PCF Dev Behind a Proxy
owner: PCF Dev
---
##<a id="run-behind-proxy"></a> Running PCF Dev Behind an HTTP 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:
* Using Mac OS X or Linux:
<pre class="terminal">
$ HTTP\_PROXY=<span>http</span>://PROXY\_IP:PROXY\_PORT \
> HTTPS\_PROXY=<span>http</span>://PROXY\_IP:PROXY\_PORT \
> cf dev start
</pre>
* Using Windows PowerShell:
<pre class="terminal">
>> $env:HTTP\_PROXY = "<span>http</span>://PROXY\_IP:PROXY\_PORT"
>> $env:HTTPS\_PROXY = "<span>http</span>://PROXY\_IP:PROXY\_PORT"
>> cf dev start
</pre>
<p class="note"><strong>Note</strong>:
Do not use <code>localhost</code> for <code>PROXY_IP</code> or as the proxy server hostname, because <code>localhost</code> 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
<code>host.cfdev.sh</code>. For a system domain <code>dev.cfdev.sh</code>, address the proxy as <code>host.cfdev.sh</code>, and so on.
</p>
##<a id="allow-cf-cli-behind-proxy"></a> Using the cf CLI Behind an HTTP Proxy
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 or Linux:
<pre class="terminal">
$ export NO\_PROXY=.dev.cfdev.sh,dev.cfdev.sh,$NO_PROXY
$ cf login -a http<span>s</span>://api.dev.cfdev.sh --skip-ssl-validation
</pre>
* For Windows PowerShell:
<pre class="terminal">
>> $env:NO\_PROXY = ".dev.cfdev.sh,dev.cfdev.sh,OTHER-DOMAINS"
>> cf login -a http<span>s</span>://api.ldev.cfdev.sh --skip-ssl-validation
</pre>
## <a id="allow-traffic-behind-proxy"></a> Allowing Application Traffic to Bypass the Proxy
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_PROXY` environment variable to a comma-separated list of hosts:
<pre class="terminal">
$ cf set-env APP\_NAME NO\_PROXY=192.0.2.54,198.51.100.34
</pre>