Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support wildcard domains in no_grpc_proxy/no_proxy proxy configurations. #1293

Open
zamnuts opened this issue Mar 8, 2020 · 1 comment
Open

Comments

@zamnuts
Copy link

zamnuts commented Mar 8, 2020

PR #1243 introduced proxy support, and preemptively both the no_grpc_proxy and no_proxy configurations which dictate what hosts/domains should not be proxied. Currently, only strict equality is used to test if a host should not be proxied. See https://github.com/grpc/grpc-node/blob/%40grpc/grpc-js%400.7.0/packages/grpc-js/src/http_proxy.ts#L119

This is great for applications that require mixed proxy usage (requests both internal and external). However, within an organization having an abundance of internal sub-domains (e.g. foo.example.com, bar.example.com, etc), every single known sub-domain must be included in the no_grpc_proxy/no_proxy list.

Solution

Support conventional wildcard entries within no_grpc_proxy/no_proxy. There are two ways to obtain multi-level sub-domain matching, whereby both have the same effect:

  • *.example.com: use *, although less common
  • .example.com: just prefix the domain with a ., most common

In both of these cases, foo.example.com, bar.qux.example.com, and example.com would match.

Secondarily, using no_proxy='*' effectively disables any and all proxy configurations. This is seen in request (linked below).

Additional references

request: request/request#1096
curl: curl/curl#1208 (comment)
GNU Emacs: https://www.gnu.org/software/emacs/manual/html_node/url/Proxies.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants