Skip to content

Commit bc30cf2

Browse files
keskydiaorhant
authored andcommitted
feat: Add support for GRPC_ARG_ENABLE_HTTP_PROXY parameter
Signed-off-by: Antoine.orhant <[email protected]>
1 parent 0c439d3 commit bc30cf2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/channel.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,15 @@ impl ChannelBuilder {
295295
);
296296
self
297297
}
298+
299+
/// If set to zero, disables use of http proxies.
300+
pub fn enable_http_proxy(mut self, num: i32) -> ChannelBuilder {
301+
self.options.insert(
302+
Cow::Borrowed(grpcio_sys::GRPC_ARG_ENABLE_HTTP_PROXY),
303+
Options::Integer(num),
304+
);
305+
self
306+
}
298307

299308
/// Set default compression algorithm for the channel.
300309
pub fn default_compression_algorithm(mut self, algo: CompressionAlgorithms) -> ChannelBuilder {

0 commit comments

Comments
 (0)