Support for Multiple Path-Based Proxies within a Single Resource #1689

Closed
opened 2026-04-05 19:39:41 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @bannert1337 on 3/21/2025

It would be extremely useful if Pangolin could support path-based routing within a single HTTP resource. Currently, Pangolin allows exposing resources as HTTP endpoints tied to an entire subdomain, but some use cases require a single tunnel to route traffic to different internal services based on URL paths.

For example, when proxying connections for Netbird, the following endpoints are needed:

Endpoint Protocol Target service and internal-port
/ HTTP dashboard:80
/signalexchange.SignalExchange/ gRPC signal:80
/api HTTP management:443
/management.ManagementService/ gRPC management:443

https://docs.netbird.io/selfhosted/selfhosted-guide#configuration-for-your-reverse-proxy

Netbird expects these endpoints to be accessible under a single hostname, but Pangolin’s current configuration forwards all requests to one destination. Without support for routing based on paths, there are two workarounds:

  1. Deploy an additional reverse proxy (e.g., Nginx or HAProxy) behind Pangolin that inspects the incoming request paths and forwards them to the correct internal service.
  2. Use multiple subdomains, one for each endpoint—this may require changes to client configurations or the application itself.

It is worth noting that while oschwartz10612’s suggestion to use the new beta rule feature (as discussed in the related issue #236/discussion #238) helps manage URL path restrictions, it does not provide the full-fledged path-based routing necessary for Netbird, in which different URL paths on the same hostname must be selectively routed to distinct internal services. The previous discussion focused on restricting access to specific endpoints (e.g., allowing only /script.js and /api/ingress), whereas Netbird needs multiple internally differentiated targets rather than simply restricting access.

Adding native support for path-based routing directly within Pangolin would simplify deployments by eliminating the need for an extra reverse proxy or subdomain changes and would directly address the Netbird use case.

Would it be possible to add this as a feature request? Thank you for considering this enhancement, and please let me know if you require any additional details or use case examples.

*Originally created by @bannert1337 on 3/21/2025* It would be extremely useful if Pangolin could support path-based routing within a single HTTP resource. Currently, Pangolin allows exposing resources as HTTP endpoints tied to an entire subdomain, but some use cases require a single tunnel to route traffic to different internal services based on URL paths. For example, when proxying connections for Netbird, the following endpoints are needed: | Endpoint | Protocol | Target service and internal-port | |:-------------------------------:|:--------:|:--------------------------------:| | / | HTTP | dashboard:80 | | /signalexchange.SignalExchange/ | gRPC | signal:80 | | /api | HTTP | management:443 | | /management.ManagementService/ | gRPC | management:443 | https://docs.netbird.io/selfhosted/selfhosted-guide#configuration-for-your-reverse-proxy Netbird expects these endpoints to be accessible under a single hostname, but Pangolin’s current configuration forwards all requests to one destination. Without support for routing based on paths, there are two workarounds: 1. Deploy an additional reverse proxy (e.g., Nginx or HAProxy) behind Pangolin that inspects the incoming request paths and forwards them to the correct internal service. 2. Use multiple subdomains, one for each endpoint—this may require changes to client configurations or the application itself. It is worth noting that while oschwartz10612’s suggestion to use the new beta rule feature (as discussed in the related issue #236/discussion #238) helps manage URL path restrictions, it does not provide the full-fledged path-based routing necessary for Netbird, in which different URL paths on the same hostname must be selectively routed to distinct internal services. The previous discussion focused on restricting access to specific endpoints (e.g., allowing only `/script.js` and `/api/ingress`), whereas Netbird needs multiple internally differentiated targets rather than simply restricting access. Adding native support for path-based routing directly within Pangolin would simplify deployments by eliminating the need for an extra reverse proxy or subdomain changes and would directly address the Netbird use case. Would it be possible to add this as a feature request? Thank you for considering this enhancement, and please let me know if you require any additional details or use case examples.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/pangolin#1689