Skip to content

Commit 8fac056

Browse files
committed
fix: [#10] add X-Forwarded-For header to nginx HTTP config
- Add proxy_set_header X-Forwarded-For to nginx HTTP (port 80) configuration - Enables HTTP tracker functionality through reverse proxy - Fix resolves tracker client connection issues when using proxy - Update smoke testing guide to reflect working HTTP tracker via proxy - Add comprehensive end-to-end smoke testing documentation - Update .gitignore to exclude cloned torrust-tracker/ directory - Add project words for documentation spelling checks Tested: - UDP trackers (6868, 6969): ✅ Working - HTTP tracker via proxy (80): ✅ Working - Health check API (80): ✅ Working - Statistics API (80): ✅ Working - Comprehensive tracker checker: ✅ All endpoints passing
1 parent 75df631 commit 8fac056

File tree

5 files changed

+522
-0
lines changed

5 files changed

+522
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
# Repository organization tool output
55
repomix-output.xml
66

7+
# Testing dependencies (when cloned locally for smoke testing)
8+
torrust-tracker/
9+
710
# Note: This repository uses distributed .gitignore files:
811
# - infrastructure/.gitignore: Infrastructure-specific files (Terraform, VMs, etc.)
912
# - application/.gitignore: Application-specific files (Docker, logs, data, etc.)

application/share/container/default/config/nginx.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ server
1111
location /api/
1212
{
1313
proxy_pass http://tracker:1212/api/;
14+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
1415
}
1516

1617
location /
1718
{
1819
proxy_pass http://tracker:7070;
20+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
1921
}
2022

2123
location ~ /.well-known/acme-challenge

docs/guides/integration-testing-guide.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,23 @@ curl -s http://$VM_IP:1212/metrics | head -10
630630

631631
## Step 6: Performance and Load Testing (Optional)
632632

633+
### Alternative: External Smoke Testing
634+
635+
For quick external validation without infrastructure complexity, consider using
636+
the dedicated [Smoke Testing Guide](smoke-testing-guide.md). This approach
637+
uses the Torrust Tracker Client tools to test your deployment from an external
638+
perspective:
639+
640+
-**Quick validation** (~5 minutes vs full integration testing)
641+
-**External black-box testing** using official client tools
642+
-**Protocol-level verification** (UDP, HTTP, API endpoints)
643+
-**No infrastructure knowledge required** - just test the deployed services
644+
-**Perfect for post-deployment validation** and sanity checks
645+
646+
The smoke testing approach complements this integration guide by providing a
647+
simpler alternative when you only need to verify that the deployed tracker
648+
is working correctly.
649+
633650
### 6.1 Measure Service Response Times
634651

635652
```bash

0 commit comments

Comments
 (0)