Skip to content

Commit d796db7

Browse files
committed
docs: [#272] Add reproduction steps for on_reverse_proxy issue
- Add 'How to Reproduce' section to task 7.5 - Document step-by-step verification of the problem - Include actual error message from tracker - Link to upstream issue torrust/torrust-tracker#1640
1 parent bf73227 commit d796db7

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

docs/issues/272-add-https-support-with-caddy.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,6 +1179,39 @@ The `on_reverse_proxy` option is **global** (in `[core.net]`), not per-tracker.
11791179

11801180
This is a limitation in the Torrust Tracker itself (not the deployer). A proper fix would require the tracker to support per-tracker `on_reverse_proxy` settings.
11811181

1182+
**Upstream Issue**: [torrust/torrust-tracker#1640](https://github.com/torrust/torrust-tracker/issues/1640)
1183+
1184+
**How to Reproduce**:
1185+
1186+
1. Deploy the manual test environment with mixed TLS/non-TLS HTTP trackers:
1187+
1188+
```bash
1189+
cargo run -- show manual-https-test
1190+
```
1191+
1192+
2. Verify the tracker config has `on_reverse_proxy = true` (set because trackers 7070, 7071 use TLS proxy):
1193+
1194+
```bash
1195+
cat build/manual-https-test/tracker/tracker.toml | grep -A2 "core.net"
1196+
# Output: [core.net]
1197+
# on_reverse_proxy = true
1198+
```
1199+
1200+
3. Make a direct HTTP announce request to the tracker on port 7072 (no proxy):
1201+
1202+
```bash
1203+
curl -v "http://<VM_IP>:7072/announce?info_hash=%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00&peer_id=-TR3000-000000000000&port=6881&uploaded=0&downloaded=0&left=0&event=started"
1204+
```
1205+
1206+
4. Observe the failure response:
1207+
1208+
```text
1209+
d14:failure reason208:Error resolving peer IP: missing or invalid the right most
1210+
X-Forwarded-For IP (mandatory on reverse proxy tracker configuration)e
1211+
```
1212+
1213+
The tracker on port 7072 expects `X-Forwarded-For` header (due to global `on_reverse_proxy = true`) but doesn't receive it from direct requests, causing the announce to fail.
1214+
11821215
**Solution**:
11831216

11841217
Rename `tls` to a clearer structure with `domain` at the top level and `use_tls_proxy` as a separate boolean. The `tls` name was misleading because it doesn't map to the tracker's TLS config - the domain is only used for Caddy proxy configuration.

0 commit comments

Comments
 (0)