11# Pingoo TLS Proxy Evaluation - Conclusion
22
3- ** Status** : Decision Pending WebSocket Verification
3+ ** Status** : ✅ EVALUATION COMPLETE
44** Last Updated** : 2026-01-12
55
6- ## Preliminary Decision
6+ ## Final Decision
77
8- ** Switch to Pingoo ** as the primary TLS proxy for Torrust Tracker deployments .
8+ ** Use hybrid architecture: ** Pingoo for Tracker services, nginx for Grafana .
99
10- Pingoo offers significant advantages in simplicity and modern security features that
11- make it the preferred choice over nginx+certbot for automatic HTTPS/TLS termination.
10+ Pingoo provides excellent TLS termination for HTTP-based services but ** does not support WebSocket connections** , which are required for Grafana Live. The hybrid approach maximizes Pingoo's simplicity benefits while maintaining full Grafana functionality.
11+
12+ ## Architecture Diagram
13+
14+ ``` text
15+ ┌─────────────────────────────────────────────────────────────────┐
16+ │ Public Internet │
17+ └─────────────────────────────────────────────────────────────────┘
18+ │ │
19+ ▼ ▼
20+ ┌──────────────────┐ ┌───────────────────┐
21+ │ Pingoo │ │ nginx+certbot │
22+ │ (port 443) │ │ (port 3443) │
23+ │ │ │ │
24+ │ api.example.com │ │grafana.example.com│
25+ │http1.example.com │ │ │
26+ └────────┬─────────┘ └────────┬──────────┘
27+ │ │
28+ ▼ ▼
29+ ┌──────────────────┐ ┌───────────────────┐
30+ │ Tracker API │ │ Grafana │
31+ │ HTTP Tracker │ │ (WebSocket) │
32+ └──────────────────┘ └───────────────────┘
33+ ```
1234
1335## Decision Rationale
1436
@@ -52,46 +74,34 @@ make it the preferred choice over nginx+certbot for automatic HTTPS/TLS terminat
5274
5375## Pending Verification
5476
55- ### WebSocket Support (Experiment 4)
77+ ### Certificate Renewal
5678
57- Grafana Live uses WebSocket connections for real-time dashboard updates. We need to
58- verify that Pingoo correctly proxies WebSocket connections.
79+ Certificate renewal cannot be tested during this evaluation (certificates are valid
80+ for 90 days). Pingoo claims automatic renewal - this should work based on the ACME
81+ implementation, but should be verified after deployment.
5982
60- ** Possible outcomes: **
83+ ## WebSocket Limitation - Root Cause
6184
62- 1 . ** WebSocket works ** → Use Pingoo for all services (Tracker API, HTTP Tracker, Grafana)
63- 2 . ** WebSocket doesn't work ** → Hybrid approach (see below)
85+ Pingoo's HTTP proxy explicitly removes the ` Upgrade ` header, which is required for
86+ WebSocket protocol upgrades. From the source code:
6487
65- ### Fallback Strategy
66-
67- If Pingoo doesn't support WebSocket for Grafana:
68-
69- ``` text
70- ┌─────────────────────────────────────────────────────────────────┐
71- │ Public Internet │
72- └─────────────────────────────────────────────────────────────────┘
73- │ │
74- ▼ ▼
75- ┌──────────────────┐ ┌──────────────────┐
76- │ Pingoo │ │ nginx+certbot │
77- │ (port 443) │ │ (port 3443) │
78- │ │ │ │
79- │ api.example.com │ │grafana.example.com│
80- │http1.example.com │ │ │
81- └────────┬─────────┘ └────────┬─────────┘
82- │ │
83- ▼ ▼
84- ┌──────────────────┐ ┌──────────────────┐
85- │ Tracker API │ │ Grafana │
86- │ HTTP Tracker │ │ (WebSocket) │
87- └──────────────────┘ └──────────────────┘
88+ ``` rust
89+ // https://github.com/pingooio/pingoo/blob/main/pingoo/services/http_proxy_service.rs
90+ const HOP_HEADERS : & [& str ] = & [
91+ " Connection" ,
92+ // ... other headers ...
93+ " Upgrade" , // This breaks WebSocket!
94+ ];
8895```
8996
90- ** Benefits of hybrid approach:**
97+ This means any service requiring WebSocket connections cannot use Pingoo's ` http_proxy ` .
98+ This is a fundamental limitation, not a configuration issue.
9199
92- - Users who don't need Grafana get the simpler Pingoo-only setup
93- - Grafana users get WebSocket support via nginx
94- - Can migrate Grafana to Pingoo when WebSocket support is added
100+ ### Potential Future Solutions
101+
102+ 1 . ** Pingoo WebSocket support** - The Pingoo team may add WebSocket support
103+ 2 . ** TCP+TLS mode** - Could use raw TCP proxying (loses HTTP routing)
104+ 3 . ** Feature request** - Could file an issue requesting WebSocket support
95105
96106## Files to Backup (for Disaster Recovery)
97107
@@ -110,12 +120,12 @@ apply to new registrations).
110120
111121## Experiment Results Summary
112122
113- | Experiment | Status | Result |
114- | ---------------------- | ----------- | ---------------------------------------- |
115- | 1. Hello World | ✅ Complete | SUCCESS - Certificate auto-generated |
116- | 2. Tracker API | ⏳ Pending | - |
117- | 3. HTTP Tracker | ⏳ Pending | - |
118- | 4. Grafana (WebSocket) | ⏳ Pending | CRITICAL - Determines final architecture |
123+ | Experiment | Status | Result |
124+ | ---------------------- | ----------- | -------------------------------------------- |
125+ | 1. Hello World | ✅ Complete | SUCCESS - Certificate auto-generated |
126+ | 2. Tracker API | ✅ Complete | SUCCESS - API endpoints work via HTTPS |
127+ | 3. HTTP Tracker | ✅ Complete | SUCCESS - BitTorrent announce/scrape working |
128+ | 4. Grafana (WebSocket) | ⚠️ Partial | HTTP works, WebSocket FAILS |
119129
120130## Key Findings from Experiments
121131
@@ -128,14 +138,35 @@ apply to new registrations).
128138- ✅ Certificate stored with domain-named files for easy identification
129139- ✅ ACME account persisted for future renewals
130140
141+ ### Experiment 2: Tracker API
142+
143+ - ✅ JSON API responses proxied correctly
144+ - ✅ Health check endpoints work
145+ - ✅ No issues with TLS 1.3 for API clients
146+
147+ ### Experiment 3: HTTP Tracker
148+
149+ - ✅ BitTorrent ` announce ` endpoint works via HTTPS
150+ - ✅ BitTorrent ` scrape ` endpoint works via HTTPS
151+ - ✅ Binary bencoded responses handled correctly
152+
153+ ### Experiment 4: Grafana (WebSocket)
154+
155+ - ✅ HTTP dashboard access works
156+ - ✅ Login and navigation work
157+ - ❌ ** WebSocket fails** - ` Upgrade ` header stripped by Pingoo
158+ - ❌ Grafana Live (real-time streaming) does not work
159+
131160## Next Steps
132161
133- 1 . Complete Experiment 2 (Tracker API) - Verify JSON API proxying
134- 2 . Complete Experiment 3 (HTTP Tracker) - Verify announce/scrape endpoints
135- 3 . Complete Experiment 4 (Grafana) - ** Critical** WebSocket verification
136- 4 . Finalize architecture decision based on Experiment 4 results
137- 5 . Update deployment templates to use Pingoo
138- 6 . Document migration path from nginx+certbot (if applicable)
162+ 1 . ✅ ~~ Complete Experiment 1 (Hello World)~~ - Certificate auto-generation verified
163+ 2 . ✅ ~~ Complete Experiment 2 (Tracker API)~~ - JSON API proxying verified
164+ 3 . ✅ ~~ Complete Experiment 3 (HTTP Tracker)~~ - BitTorrent protocol verified
165+ 4 . ✅ ~~ Complete Experiment 4 (Grafana)~~ - WebSocket limitation discovered
166+ 5 . 🔲 File issue with Pingoo project requesting WebSocket support
167+ 6 . 🔲 Update deployment templates with hybrid architecture
168+ 7 . 🔲 Document migration path from pure nginx+certbot
169+ 8 . 🔲 Implement Pingoo templates in deployer codebase
139170
140171## References
141172
0 commit comments