Skip to content

Commit 197ba68

Browse files
authored
Merge pull request fluent#1501 from fluent/lynettemiles/sc-105734/update-administration-http-proxy-md-fluent
2 parents 9526d71 + 61c1c07 commit 197ba68

File tree

2 files changed

+43
-26
lines changed

2 files changed

+43
-26
lines changed

administration/http-proxy.md

+43-25
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,81 @@
11
---
2-
description: Enable traffic through a proxy server via HTTP_PROXY environment variable
2+
description: Enable traffic through a proxy server using the HTTP_PROXY environment variable.
33
---
44

55
# HTTP Proxy
66

7-
Fluent Bit supports configuring an HTTP proxy for all egress HTTP/HTTPS traffic via the `HTTP_PROXY` or `http_proxy` environment variable.
7+
Fluent Bit supports configuring an HTTP proxy for all egress HTTP/HTTPS traffic
8+
using the `HTTP_PROXY` or `http_proxy` environment variable.
89

910
The format for the HTTP proxy environment variable is `http://USER:PASS@HOST:PORT`, where:
1011

11-
* `USER` is the username when using basic authentication.
12-
* `PASS` is the password when using basic authentication.
13-
* `HOST` is the HTTP proxy hostname or IP address.
14-
* `PORT` is the port the HTTP proxy is listening on.
12+
- _`USER`_ is the username when using basic authentication.
13+
- _`PASS`_ is the password when using basic authentication.
14+
- _`HOST`_ is the HTTP proxy hostname or IP address.
15+
- _`PORT`_ is the port the HTTP proxy is listening on.
1516

1617
To use an HTTP proxy with basic authentication, provide the username and password:
1718

18-
```bash
19+
```text
1920
HTTP_PROXY='http://example_user:[email protected]:8080'
2021
```
2122

2223
When no authentication is required, omit the username and password:
2324

24-
```bash
25+
```text
2526
HTTP_PROXY='http://proxy.example.com:8080'
2627
```
2728

28-
The `HTTP_PROXY` environment variable is a [standard way](https://docs.docker.com/network/proxy/#use-environment-variables) for setting a HTTP proxy in a containerized environment, and it is also natively supported by any application written in Go. Therefore, we follow and implement the same convention for Fluent Bit. For convenience and compatibility, the `http_proxy` environment variable is also supported. When both the `HTTP_PROXY` and `http_proxy` environment variables are provided, `HTTP_PROXY` will be preferred.
29+
The `HTTP_PROXY` environment variable is a [standard
30+
way](https://docs.docker.com/network/proxy/#use-environment-variables) of setting a
31+
HTTP proxy in a containerized environment, and it's also natively supported by any
32+
application written in Go. Fluent Bit implements the same convention. The
33+
`http_proxy` environment variable is also supported. When both the `HTTP_PROXY` and
34+
`http_proxy` environment variables are provided, `HTTP_PROXY` will be preferred.
2935

3036
{% hint style="info" %}
31-
**Note**: The [HTTP output plugin](https://docs.fluentbit.io/manual/pipeline/outputs/http) also supports configuring an HTTP proxy. This configuration continues to work, however it _should not_ be used together with the `HTTP_PROXY` or `http_proxy` environment variable. This is because under the hood, the environment variable based proxy configuration is implemented by setting up a TCP connection tunnel via [HTTP CONNECT](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/CONNECT). Unlike the plugin's implementation, this supports both HTTP and HTTPS egress traffic.
37+
38+
The [HTTP output plugin](https://docs.fluentbit.io/manual/pipeline/outputs/http) also
39+
supports configuring an HTTP proxy. This configuration works, but shouldn't be used
40+
with the `HTTP_PROXY` or `http_proxy` environment variable. The environment
41+
variable-based proxy configuration is implemented by creating a TCP connection tunnel
42+
using
43+
[HTTP CONNECT](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/CONNECT). Unlike
44+
the plugin's implementation, this supports both HTTP and HTTPS egress traffic.
45+
3246
{% endhint %}
3347

34-
# NO_PROXY
48+
## `NO_PROXY`
3549

36-
Not all traffic should flow through the HTTP proxy. In this case, the `NO_PROXY` or `no_proxy` environment variable should be used.
50+
Use the `NO_PROXY` environment variable when traffic shouldn't flow through the HTTP
51+
proxy. The `no_proxy` environment variable is also supported. When both `NO_PROXY`
52+
and `no_proxy` environment variables are provided, `NO_PROXY` takes precedence.
3753

38-
The format for the no proxy environment variable is a comma-separated list of hostnames or IP addresses whose traffic should not flow through the HTTP proxy.
54+
The format for the `no_proxy` environment variable is a comma-separated list of
55+
host names or IP addresses.
3956

40-
A domain name matches itself and all its subdomains (i.e. `foo.com` matches `foo.com` and `bar.foo.com`):
57+
A domain name matches itself and all of its subdomains (for example, `example.com`
58+
matches both `example.com` and `test.example.com`):
4159

42-
```bash
60+
```text
4361
NO_PROXY='foo.com,127.0.0.1,localhost'
4462
```
4563

46-
A domain with a leading `.` only matches its subdomains (i.e. `.foo.com` matches `bar.foo.com` but not `foo.com`):
64+
A domain with a leading dot (`.`) matches only its subdomains (for example,
65+
`.example.com` matches `test.example.com` but not `example.com`):
4766

48-
```bash
49-
NO_PROXY='.foo.com,127.0.0.1,localhost'
67+
```text
68+
NO_PROXY='.example.com,127.0.0.1,localhost'
5069
```
5170

52-
One typical use case for `NO_PROXY` is when running Fluent Bit in a Kubernetes environment, where we want:
71+
As an example, you might use `NO_PROXY` when running Fluent Bit in a Kubernetes
72+
environment, where and you want:
5373

54-
* All real egress traffic to flow through an HTTP proxy.
55-
* All local Kubernetes traffic to not flow through the HTTP proxy.
74+
- All real egress traffic to flow through an HTTP proxy.
75+
- All local Kubernetes traffic to not flow through the HTTP proxy.
5676

57-
In this case, we can set:
77+
In this case, set:
5878

59-
```bash
79+
```text
6080
NO_PROXY='127.0.0.1,localhost,kubernetes.default.svc'
6181
```
62-
63-
For convenience and compatibility, the `no_proxy` environment variable is also supported. When both the `NO_PROXY` and `no_proxy` environment variables are provided, `NO_PROXY` will be preferred.

vale-styles/FluentBit/WordList.yml

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ swap:
2828
Android device: Android-powered device
2929
android: Android
3030
API explorer: APIs Explorer
31-
application: app
3231
approx\.: approximately
3332
as well as: and
3433
authN: authentication

0 commit comments

Comments
 (0)