You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Everett Toews <no...@github.com> on 2014/04/21 17:00:15 UTC

[jclouds-site] How to use a proxy with jclouds (#84)

You can merge this Pull Request by running:

  git pull https://github.com/rackerlabs/jclouds-site logging-https

Or you can view, comment on it, or merge it online at:

  https://github.com/jclouds/jclouds-site/pull/84

-- Commit Summary --

  * How to use a proxy with jclouds

-- File Changes --

    M reference/configuration.md (9)
    M reference/logging.md (45)

-- Patch Links --

https://github.com/jclouds/jclouds-site/pull/84.patch
https://github.com/jclouds/jclouds-site/pull/84.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/84

Re: [jclouds-site] How to use a proxy with jclouds (#84)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-site-pull-requests #262](https://jclouds.ci.cloudbees.com/job/jclouds-site-pull-requests/262/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/84#issuecomment-40941846

Re: [jclouds-site] How to use a proxy with jclouds (#84)

Posted by jclouds-commentator <no...@github.com>.
  Go to http://1363a66267acad804e25-83e3c1d6c235f1462c0f63349c8103c3.r31.cf1.rackcdn.com/ to review your changes.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/84#issuecomment-40942006

Re: [jclouds-site] How to use a proxy with jclouds (#84)

Posted by Andrew Phillips <no...@github.com>.
> @@ -132,3 +133,49 @@ MyApi myApi = ContextBuilder.newBuilder("my-cloud-provider")
>      .modules(modules)
>      .buildApi(MyApi.class);
>  {% endhighlight %}
> +
> +## <a id="proxy"></a>HTTP(S) Proxy
> +
> +This is optional and not necessary for regular jclouds logging.
> +
> +There may be times when you need to see every bit and byte being sent with jclouds to/from a cloud provider. To do this you can use a proxy to capture all traffic that's being transmitted.

"you can use an HTTP(S) proxy"?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/84/files#r11842675

Re: [jclouds-site] How to use a proxy with jclouds (#84)

Posted by Everett Toews <no...@github.com>.
Closed #84.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/84

Re: [jclouds-site] How to use a proxy with jclouds (#84)

Posted by Andrew Phillips <no...@github.com>.
A couple of small comments - otherwise, good to go for me. Thanks, @everett-toews!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/84#issuecomment-41015771

Re: [jclouds-site] How to use a proxy with jclouds (#84)

Posted by Everett Toews <no...@github.com>.
> @@ -7,6 +7,7 @@ permalink: /reference/logging/
>  1. [Install](#install)
>  1. [Configure](#configure)
>  1. [Enable](#enable)
> +1. [Proxy](#proxy)

I'll change it to HTTP(S) Proxy.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/84/files#r11820658

Re: [jclouds-site] How to use a proxy with jclouds (#84)

Posted by Andrew Phillips <no...@github.com>.
> +1. Proxy > Proxy Settings > SSL tab
> +1. Check Enable SSL Proxying
> +1. Add Locations. e.g.
> +    1. *.rackspacecloud.com
> +    1. *.clouddrive.com
> +
> +jclouds also requires some configuration to use a proxy.
> +
> +{% highlight java %}
> +import static org.jclouds.Constants.*;
> +
> +// snip
> +
> +Properties overrides = new Properties();
> +overrides.setProperty(PROPERTY_PROXY_HOST, "localhost");
> +overrides.setProperty(PROPERTY_PROXY_PORT, "8888");

Are we sure this works in all places? I see [`ProxyConfig`](https://github.com/jclouds/jclouds/blob/master/core/src/main/java/org/jclouds/proxy/ProxyConfig.java) used in the apachehc driver and in JSch, but not in e.g. SSHJ. Or are we only interested in HTTP(S) here?
```
drivers\apachehc\src\main\java\org\jclouds\http\apachehc\config\ApacheHCHttpComm
andExecutorServiceModule.java:import org.jclouds.proxy.ProxyConfig;
drivers\apachehc\src\main\java\org\jclouds\http\apachehc\config\ApacheHCHttpComm
andExecutorServiceModule.java:   HttpClient newDefaultHttpClient(ProxyConfig con
fig, BasicHttpParams params, ClientConnectionManager cm) {
drivers\jsch\src\main\java\org\jclouds\ssh\jsch\config\JschSshClientModule.java:
import org.jclouds.proxy.ProxyConfig;
drivers\jsch\src\main\java\org\jclouds\ssh\jsch\config\JschSshClientModule.java:
      private final ProxyConfig proxyConfig;
drivers\jsch\src\main\java\org\jclouds\ssh\jsch\config\JschSshClientModule.java:
      public Factory(ProxyConfig proxyConfig, BackoffLimitedRetryHandler backoff
LimitedRetryHandler, Injector injector) {
drivers\jsch\src\main\java\org\jclouds\ssh\jsch\JschSshClient.java:import org.jc
louds.proxy.ProxyConfig;
drivers\jsch\src\main\java\org\jclouds\ssh\jsch\JschSshClient.java:   public Jsc
hSshClient(ProxyConfig proxyConfig, BackoffLimitedRetryHandler backoffLimitedRet
ryHandler, HostAndPort socket,
drivers\jsch\src\main\java\org\jclouds\ssh\jsch\SessionConnection.java:import or
g.jclouds.proxy.ProxyConfig;
drivers\jsch\src\main\java\org\jclouds\ssh\jsch\SessionConnection.java:      pub
lic Builder proxy(ProxyConfig proxyConfig) {
```

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/84/files#r11811367

Re: [jclouds-site] How to use a proxy with jclouds (#84)

Posted by Andrew Phillips <no...@github.com>.
> @@ -132,3 +133,49 @@ MyApi myApi = ContextBuilder.newBuilder("my-cloud-provider")
>      .modules(modules)
>      .buildApi(MyApi.class);
>  {% endhighlight %}
> +
> +## <a id="proxy"></a>HTTP(S) Proxy
> +
> +This is optional and not necessary for regular jclouds logging.
> +
> +There may be times when you need to see every bit and byte being sent with jclouds to/from a cloud provider. To do this you can use a proxy to capture all traffic that's being transmitted.
> +
> +One such proxy is [Charles Proxy](http://www.charlesproxy.com/). To work with an HTTPS endpoint of a cloud provider you need to configure Charles to enable SSL Proxying:

Do we also want to mention [Fiddler](http://www.telerik.com/fiddler)? Any special reason to recommend Charles Proxy?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/84/files#r11842695

Re: [jclouds-site] How to use a proxy with jclouds (#84)

Posted by Andrew Phillips <no...@github.com>.
> @@ -132,3 +133,49 @@ MyApi myApi = ContextBuilder.newBuilder("my-cloud-provider")
>      .modules(modules)
>      .buildApi(MyApi.class);
>  {% endhighlight %}
> +
> +## <a id="proxy"></a>HTTP(S) Proxy
> +
> +This is optional and not necessary for regular jclouds logging.
> +
> +There may be times when you need to see every bit and byte being sent with jclouds to/from a cloud provider. To do this you can use a proxy to capture all traffic that's being transmitted.
> +
> +One such proxy is [Charles Proxy](http://www.charlesproxy.com/). To work with an HTTPS endpoint of a cloud provider you need to configure Charles to enable SSL Proxying:
> +
> +1. Proxy > Proxy Settings > SSL tab
> +1. Check Enable SSL Proxying
> +1. Add Locations. e.g.

"Locations, e.g."

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/84/files#r11842705

Re: [jclouds-site] How to use a proxy with jclouds (#84)

Posted by Andrew Phillips <no...@github.com>.
> Fixed. Squashed. Merged. Deployed!

Thanks, @everett-toews!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/84#issuecomment-41096758

Re: [jclouds-site] How to use a proxy with jclouds (#84)

Posted by Andrew Phillips <no...@github.com>.
> @@ -7,6 +7,7 @@ permalink: /reference/logging/
>  1. [Install](#install)
>  1. [Configure](#configure)
>  1. [Enable](#enable)
> +1. [Proxy](#proxy)

Call this "HTTP(S) Proxy"? jclouds also supports proxying other socket connections, and the JSch driver at least should honour that (see comment below), but from what I can gather we're only talking about HTTP(S) traffic here?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/84/files#r11811436

Re: [jclouds-site] How to use a proxy with jclouds (#84)

Posted by Everett Toews <no...@github.com>.
> +1. Proxy > Proxy Settings > SSL tab
> +1. Check Enable SSL Proxying
> +1. Add Locations. e.g.
> +    1. *.rackspacecloud.com
> +    1. *.clouddrive.com
> +
> +jclouds also requires some configuration to use a proxy.
> +
> +{% highlight java %}
> +import static org.jclouds.Constants.*;
> +
> +// snip
> +
> +Properties overrides = new Properties();
> +overrides.setProperty(PROPERTY_PROXY_HOST, "localhost");
> +overrides.setProperty(PROPERTY_PROXY_PORT, "8888");

Good point. I see what you mean. I consider proxying HTTP(S) for this purpose to be another kind of logging, which is why I included it in this logging guide along with all of the other HTTP(S) logging jclouds can do. You're right. We should make a distinction between that and SSH proxying. 

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/84/files#r11820637

Re: [jclouds-site] How to use a proxy with jclouds (#84)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-site-pull-requests #265](https://jclouds.ci.cloudbees.com/job/jclouds-site-pull-requests/265/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/84#issuecomment-41062040

Re: [jclouds-site] How to use a proxy with jclouds (#84)

Posted by jclouds-commentator <no...@github.com>.
  Go to http://1b1ab759be71c4d3c389-2c59777b65bf68d70ba619aad1263803.r79.cf1.rackcdn.com/ to review your changes.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/84#issuecomment-40965813

Re: [jclouds-site] How to use a proxy with jclouds (#84)

Posted by Everett Toews <no...@github.com>.
Fixed. Squashed. Merged. Deployed!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/84#issuecomment-41066666

Re: [jclouds-site] How to use a proxy with jclouds (#84)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-site-pull-requests #263](https://jclouds.ci.cloudbees.com/job/jclouds-site-pull-requests/263/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/84#issuecomment-40965622