mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-07 21:30:36 -05:00
[GH-ISSUE #2418] HTTP Resources return 418 - TCP proxy not listening on internal ports via WireGuard #6960
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @remibardalen on GitHub (Feb 5, 2026).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/2418
Environment
--network hostDescription
HTTP Resources configured with
sso=0(public access) return HTTP 418 instead of reaching the backend. The TCP proxy starts according to Newt logs, but connections to the internal ports via WireGuard are refused.Steps to Reproduce
Expected Behavior
Request should pass through WireGuard tunnel to backend and return content from the target server.
Actual Behavior
Badger: Valid session)http://100.89.128.4:<internalPort>Debugging Done
1. WireGuard tunnel connectivity
2. Pangolin API verify-session
3. Newt logs show TCP proxy starting
4. But connection to internal port fails
5. Database configuration verified correct
Attempted Fixes (none worked)
Additional Notes
@remibardalen commented on GitHub (Feb 5, 2026):
Root Cause Found & Solution
After extensive debugging, the issue is now resolved.
The Problem
When HTTP Resource targets point to a reverse proxy (like Traefik) that does HTTP→HTTPS redirects:
301 Moved Permanentlyto HTTPSwhoami.example.com) but receives the IP address"remote error: tls: unrecognized name"418 I'm a teapotor502 Bad GatewayThe Solution
Point targets directly to backend services instead of through a local reverse proxy:
For services only available in Docker networks, expose them on a host port:
Confirmed working from both desktop and mobile.
Suggestions for Future Improvements
1. Better Error Messages
The
418 I'm a teapotresponse doesn't indicate what's wrong. Consider returning502 Bad Gatewaywith a descriptive error body, or log the actual TLS/connection error.2. Dashboard Warnings
Add warnings in the resource configuration UI when target method is
httpand port is80or443(common reverse proxy ports), suggesting users point directly to their application.3. Documentation
Add a troubleshooting section about:
4. SNI Passthrough Option
Consider adding an option to set custom SNI when connecting to HTTPS backends.
5. Health Check Enhancement
When a target is configured, perform a connectivity test that detects redirect responses and TLS errors before saving.
Thanks for a great product!