-
Notifications
You must be signed in to change notification settings - Fork 146
Open
Description
Reproduction
- Set environment variable
https_proxy=myproxy:1234
, whereas myproxy:1234 is a Squid proxy. This is a global user config, applying to the entire user session, set e.g. (among others) by the GNOME settings tool for the GNOME browser. - Run
hue.discovery.nupnpSearch();
- Manually configure the bridge IP address and run
hue.api.createLocal(hueBridgeLocalIPAddress).connect();
Actual result
Both calls (step 2 and step 3) return with error message:
Request failed with status code 501
- The HTTP proxy is used for contacting the local Hue bridge. That is likely to fail.
- The HTTP proxy request used is invalid. The protocol implementation is incorrect. This is a TLS request, so the HTTP
CONNECT
command is required, but it's not used, leading to the error.
Expected result
- If you want to use HTTPS or TLS request via HTTP proxy, the HTTP CONNECT protocol is required.
- The HTTP proxy is not used for contacting the Hue bridge, because the bridge is local. The HTTP proxy is for the Internet.
- It may be helpful to use the HTTP proxy for contacting the discovery.meethue.com server, but given that the Hue bridge contacts the server without proxy, it's actually more privacy-preserving not to use the proxy, to avoid that the Hue server can associate the proxy IP address and real IP address. So, even in this case, I recommend to ignore the HTTP proxy.
It's better to completely un-support and ignore proxies than doing an invalid request that will fail.
In short: Don't use the HTTP proxy at all. It makes no sense for this API.
Metadata
Metadata
Assignees
Labels
No labels