maytasm commented on a change in pull request #11891:
URL: https://github.com/apache/druid/pull/11891#discussion_r745140581



##########
File path: docs/development/modules.md
##########
@@ -356,6 +356,24 @@ 
druid.coordinator.cleanupMetadata.duty.killSupervisors.retainDuration=PT0M
 druid.coordinator.cleanupMetadata.period=PT10S
 ```
 
+### Routing data through a HTTP proxy for your extension
+
+It is possible to adds the ability for the HttpClient of your extension to 
connect through a HTTP proxy. 
+Internally, Druid will augment the channel factory to check if it is supposed 
to be proxied and, if so, connect to the proxy host first, 
+issue a CONNECT command through to the final recipient host and then give the 
channel to the normal http client for usage.
+
+To enable this feature and allow for proxy in your extension's HTTP client, 
+first, add `HttpClientProxyConfig` as a `@JsonProperty` to the HTTP config 
class of your extension. 
+Next, in the extension's module class, add `HttpProxyConfig` to 
`HttpClientConfig`. For example, 
+```
+final HttpClientConfig.Builder builder = HttpClientConfig
+    .builder()
+    .withNumConnections(1)
+    .withReadTimeout(config.getReadTimeout().toStandardDuration())
+    .withHttpProxyConfig(config.getProxyConfig());
+```
+(note that the `config` variable in the example above is the HTTP config class 
of your extension)

Review comment:
       Done

##########
File path: docs/development/modules.md
##########
@@ -356,6 +356,24 @@ 
druid.coordinator.cleanupMetadata.duty.killSupervisors.retainDuration=PT0M
 druid.coordinator.cleanupMetadata.period=PT10S
 ```
 
+### Routing data through a HTTP proxy for your extension
+
+It is possible to adds the ability for the HttpClient of your extension to 
connect through a HTTP proxy. 
+Internally, Druid will augment the channel factory to check if it is supposed 
to be proxied and, if so, connect to the proxy host first, 
+issue a CONNECT command through to the final recipient host and then give the 
channel to the normal http client for usage.
+
+To enable this feature and allow for proxy in your extension's HTTP client, 
+first, add `HttpClientProxyConfig` as a `@JsonProperty` to the HTTP config 
class of your extension. 
+Next, in the extension's module class, add `HttpProxyConfig` to 
`HttpClientConfig`. For example, 

Review comment:
       Done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to