-
Notifications
You must be signed in to change notification settings - Fork 82
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
Respect http.proxy and http.proxyAuthorization settings #416
Comments
As far as I can tell, the client side code (which downloads the XML language server) works through the proxy if you set up |
Could you explain more please what is your problem with proxy. I suspect that it's a download of DTD, XSD declared in a XML, is that? |
Yes, schema downloading is the issue |
Do you use binary mode https://github.com/redhat-developer/vscode-xml/blob/354fc8c06757612e292a5a278b67353207324bd9/docs/Preferences.md#server-binary-mode or java mode (have you Java which is installed?) |
I managed to get schema downloading to work through a local proxy using the instructions Angelo posted. @fbricon Do you think it makes sense to pass the VS Code proxy settings to the VM args of the language server? FYI: it looks to me like Java doesn't resolve localhost in |
I guess we could automatically port the http proxy settings from vscode to their java equivalent, and inject them if the've not been set in vmargs already. |
Yes, we expose vmargs. I'll work on injecting the properties if they aren't already present in the user-created vmargs. |
This approach (injecting |
Interprets the `http.proxyHost` and `http.proxyAuthorization` settings in order to set up the JVM arguments in order to configure the proxy for the language server. This means if the proxy is configured through these settings in VS Code, then vscode-xml will download schemas through the proxy. If the proxy is already configured in `xml.server.vmargs`, then the `http.proxyHost` and `http.proxyAuthorization` are ignored. Limitations: * Does not work with the binary server * If `http.proxyAuthorization` is used, it is assumed to be [Basic authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization#directives), with a username/password pair, since the JVM expects a username/password pair. Closes redhat-developer#416 Signed-off-by: David Thompson <davthomp@redhat.com>
Reads the proxy configuration from these env: * `HTTP_PROXY_HOST` * `HTTP_PROXY_PORT` * `HTTP_PROXY_USERNAME` * `HTTP_PROXY_PASSWORD` A part of resolving redhat-developer/vscode-xml#416 Signed-off-by: David Thompson <davthomp@redhat.com>
Interprets the `http.proxyHost` and `http.proxyAuthorization` settings in order to set up the JVM arguments or environment variables in order to configure the proxy for the language server. JVM arguments are used when running the Java server, and environment variables are used when running the binary server. This means if the proxy is configured through these settings in VS Code, then vscode-xml will download schemas through the proxy. While running the Java server, if the proxy is already configured in `xml.server.vmargs`, then the `http.proxyHost` and `http.proxyAuthorization` are ignored. Limitations: * If `http.proxyAuthorization` is used, it is assumed to be [Basic authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization#directives), with a username/password pair, since the JVM expects a username/password pair. Requires eclipse/lemminx# Closes redhat-developer#416 Signed-off-by: David Thompson <davthomp@redhat.com>
Interprets the `http.proxyHost` and `http.proxyAuthorization` settings in order to set up the JVM arguments or environment variables in order to configure the proxy for the language server. JVM arguments are used when running the Java server, and environment variables are used when running the binary server. This means if the proxy is configured through these settings in VS Code, then vscode-xml will download schemas through the proxy. While running the Java server, if the proxy is already configured in `xml.server.vmargs`, then the `http.proxyHost` and `http.proxyAuthorization` are ignored. Limitations: * If `http.proxyAuthorization` is used, it is assumed to be [Basic authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization#directives), with a username/password pair, since the JVM expects a username/password pair. Requires eclipse-lemminx/lemminx#1012 Closes redhat-developer#416 Signed-off-by: David Thompson <davthomp@redhat.com>
Interprets the `http.proxyHost` and `http.proxyAuthorization` settings in order to set up the JVM arguments or environment variables in order to configure the proxy for the language server. JVM arguments are used when running the Java server, and environment variables are used when running the binary server. This means if the proxy is configured through these settings in VS Code, then vscode-xml will download schemas through the proxy. While running the Java server, if the proxy is already configured in `xml.server.vmargs`, then the `http.proxyHost` and `http.proxyAuthorization` are ignored. Limitations: * If `http.proxyAuthorization` is used, it is assumed to be [Basic authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization#directives), with a username/password pair, since the JVM expects a username/password pair. Requires eclipse-lemminx/lemminx#1012 Closes redhat-developer#416 Signed-off-by: David Thompson <davthomp@redhat.com>
Reads the proxy configuration from these env: * `HTTP_PROXY_HOST` * `HTTP_PROXY_PORT` * `HTTP_PROXY_USERNAME` * `HTTP_PROXY_PASSWORD` A part of resolving redhat-developer/vscode-xml#416 Signed-off-by: David Thompson <davthomp@redhat.com>
Interprets the `http.proxyHost` and `http.proxyAuthorization` settings in order to set up the JVM arguments or environment variables in order to configure the proxy for the language server. JVM arguments are used when running the Java server, and environment variables are used when running the binary server. This means if the proxy is configured through these settings in VS Code, then vscode-xml will download schemas through the proxy. While running the Java server, if the proxy is already configured in `xml.server.vmargs`, then the `http.proxyHost` and `http.proxyAuthorization` are ignored. Limitations: * If `http.proxyAuthorization` is used, it is assumed to be [Basic authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization#directives), with a username/password pair, since the JVM expects a username/password pair. Requires eclipse-lemminx/lemminx#1012 Closes #416 Signed-off-by: David Thompson <davthomp@redhat.com>
Proxy support doesn't work out of the box
The text was updated successfully, but these errors were encountered: