Open johnny15243 opened 6 days ago
@johnny15243 I guess gRPC service you are running do not support vdir or have an invalid base URL (or similar) setting.
To be exact, vdir rule share the same reverse proxy router object as proxy rules but with automatic rewrites on the path name. Zoraxy will rewrite the hostname automatically on vdir requests (i.e. yourdomain.com/vdir/myresources -> upstream_ip:port/myresources), in this case, I guess there is a misconfiguration in your upstream gRPC server or your gRPC server do not support such path rewrite.
@tobychui Thanks for the response :-)
First. The path rewrite is no problem. If i add the path to the proxy target, it appends it. So it works fine. See
{
"MatchingPath": "/api/",
"Domain": "127.0.0.1:33073/api/",
"RequireTLS": false,
"SkipCertValidations": false,
"Disabled": false
},
To day i scanned the packets via tcpdump.
tcpdump -i lo -A -q '(tcp port 33073) or (udp port 33073)'
I recognized that the request is done via h2 (http2 with tls). But the target needs a communication via h2c (http2 without tls). Http1 is also not allowed via gRPC. Is this a feature you can add?
Here is a caddy.conf-sample for netbird.
netbird.example.net {
reverse_proxy /* netbird-dash:80
reverse_proxy /signalexchange.SignalExchange/* h2c://netbird-signal
reverse_proxy /api/* netbird-mgmt
reverse_proxy /management.ManagementService/* h2c://netbird-mgmt
header * {
Strict-Transport-Security "max-age=3600; includeSubDomains; preload"
X-Content-Type-Options "nosniff"
X-Frame-Options "DENY"
X-XSS-Protection "1; mode=block"
-Server
Referrer-Policy strict-origin-when-cross-origin
}
}
What happened? I tried to get Netbird running. I started with the advanced installation.
After configuring the vdir for proxy, have the following errors
If i use the vdir as proxy target, and call uri. No errors appear
Here is my Configuration
Describe the networking setup you are using Here are some example, commonly asked questions from our maintainers:
Additional context Add any other context or screenshots about the feature request here. The following uri-Path are gRPC-Services and normally called via h2c [http2] within caddy /management.ManagementService/ and /signalexchange.SignalExchange/