Skip to content

Commit

Permalink
chore(docs): update outputs of examples (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
danroc authored Jan 6, 2025
1 parent 437c4be commit f1d2f1a
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 71 deletions.
33 changes: 12 additions & 21 deletions examples/caddy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,14 @@ In a different console, use `curl` to test the services:

**✅ Allowed:**

HTTP request:
Request:

```bash
curl -fH "Host: whoami-1.local" http://localhost:8080
```

HTTP response:

```bash
Hostname: 3ebe84e41589
$ curl -fH "Host: whoami-1.local" http://localhost:8080
Hostname: e3edb3161f2e
IP: 127.0.0.1
IP: 172.19.0.4
RemoteAddr: 172.19.0.5:51044
IP: 172.19.0.3
RemoteAddr: 172.19.0.5:38128
GET / HTTP/1.1
Host: whoami-1.local
User-Agent: curl/8.7.1
Expand All @@ -41,30 +36,26 @@ Accept-Encoding: gzip
X-Forwarded-For: 172.19.0.1
X-Forwarded-Host: whoami-1.local
X-Forwarded-Proto: http

```

Geoblock logs:
Logs:

```log
geoblock-1 | time="2024-11-19T23:09:06Z" level=info msg="Request authorized" request_domain=whoami-1.local request_method=GET source_asn=0 source_country= source_ip=172.19.0.1 source_org=
geoblock-1 | time="2025-01-06T09:33:34Z" level=info msg="Request authorized" request_domain=whoami-1.local request_method=GET source_asn=0 source_country= source_ip=172.19.0.1 source_org=
```

**❌ Blocked:**

HTTP request:

```bash
curl -fH "Host: whoami-2.local" http://localhost:8080
```

HTTP response:
Request:

```bash
$ curl -fH "Host: whoami-2.local" http://localhost:8080
curl: (22) The requested URL returned error: 403
```

Geoblock logs:
Logs:

```log
geoblock-1 | time="2024-11-19T23:09:16Z" level=warning msg="Request denied" request_domain=whoami-2.local request_method=GET source_asn=0 source_country= source_ip=172.19.0.1 source_org=
geoblock-1 | time="2025-01-06T09:33:59Z" level=warning msg="Request denied" request_domain=whoami-2.local request_method=GET source_asn=0 source_country= source_ip=172.19.0.1 source_org=
```
40 changes: 12 additions & 28 deletions examples/nginx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,54 +20,38 @@ In a different console, use `curl` to test the services:

**✅ Allowed:**

HTTP request:
Request:

```bash
curl -fH "Host: whoami-1.local" http://localhost:8080
```

HTTP response:

```bash
Hostname: 99704d18aa93
$ curl -fH "Host: whoami-1.local" http://localhost:8080
Hostname: faf5680d9138
IP: 127.0.0.1
IP: 172.18.0.4
RemoteAddr: 172.18.0.5:56060
IP: 172.20.0.3
RemoteAddr: 172.20.0.5:35620
GET / HTTP/1.1
Host: whoami-1.local
User-Agent: curl/8.7.1
Accept: */*
Accept-Encoding: gzip
X-Forwarded-For: 172.18.0.1
X-Forwarded-Host: whoami-1.local
X-Forwarded-Port: 80
X-Forwarded-Proto: http
X-Forwarded-Server: 750f0338632d
X-Real-Ip: 172.18.0.1
Connection: close
```

Geoblock logs:
Logs:

```log
geoblock-1 | time="2024-11-19T19:12:40Z" level=info msg="Request authorized" request_domain=whoami-1.local request_method=GET source_asn=0 source_country= source_ip=172.18.0.1 source_org=
geoblock-1 | time="2025-01-06T09:30:19Z" level=info msg="Request authorized" request_domain=whoami-1.local request_method=GET source_asn=0 source_country= source_ip=172.20.0.1 source_org=
```

**❌ Blocked:**

HTTP request:

```bash
curl -fH "Host: whoami-2.local" http://localhost:8080
```

HTTP response:
Request:

```bash
$ curl -fH "Host: whoami-2.local" http://localhost:8080
curl: (22) The requested URL returned error: 403
```

Geoblock logs:
Logs:

```log
geoblock-1 | time="2024-11-19T19:12:41Z" level=warning msg="Request denied" request_domain=whoami-2.local request_method=GET source_asn=0 source_country= source_ip=172.18.0.1 source_org=
geoblock-1 | time="2025-01-06T09:30:38Z" level=warning msg="Request denied" request_domain=whoami-2.local request_method=GET source_asn=0 source_country= source_ip=172.20.0.1 source_org=
```
34 changes: 12 additions & 22 deletions examples/traefik/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,14 @@ In a different console, use `curl` to test the services:

**✅ Allowed:**

HTTP request:
Request:

```bash
curl -fH "Host: whoami-1.local" http://localhost:8080
```

HTTP response:

```bash
Hostname: 99704d18aa93
$ curl -fH "Host: whoami-1.local" http://localhost:8080
Hostname: 0e9e69b86ee1
IP: 127.0.0.1
IP: 172.18.0.4
RemoteAddr: 172.18.0.5:56060
IP: 172.18.0.3
RemoteAddr: 172.18.0.5:54996
GET / HTTP/1.1
Host: whoami-1.local
User-Agent: curl/8.7.1
Expand All @@ -41,32 +36,27 @@ X-Forwarded-For: 172.18.0.1
X-Forwarded-Host: whoami-1.local
X-Forwarded-Port: 80
X-Forwarded-Proto: http
X-Forwarded-Server: 750f0338632d
X-Forwarded-Server: 22811a12f1c1
X-Real-Ip: 172.18.0.1
```

Geoblock logs:
Logs:

```log
geoblock-1 | time="2024-11-19T19:12:40Z" level=info msg="Request authorized" request_domain=whoami-1.local request_method=GET source_asn=0 source_country= source_ip=172.18.0.1 source_org=
geoblock-1 | time="2025-01-06T09:26:49Z" level=info msg="Request authorized" request_domain=whoami-1.local request_method=GET source_asn=0 source_country= source_ip=172.18.0.1 source_org=
```

**❌ Blocked:**

HTTP request:

```bash
curl -fH "Host: whoami-2.local" http://localhost:8080
```

HTTP response:
Request:

```bash
$ curl -fH "Host: whoami-2.local" http://localhost:8080
curl: (22) The requested URL returned error: 403
```

Geoblock logs:
Logs:

```log
geoblock-1 | time="2024-11-19T19:12:41Z" level=warning msg="Request denied" request_domain=whoami-2.local request_method=GET source_asn=0 source_country= source_ip=172.18.0.1 source_org=
geoblock-1 | time="2025-01-06T09:27:34Z" level=warning msg="Request denied" request_domain=whoami-2.local request_method=GET source_asn=0 source_country= source_ip=172.18.0.1 source_org=
```

0 comments on commit f1d2f1a

Please sign in to comment.