Open belichuk opened 3 years ago
I used proxy in my local network for security reasons. But ewelink-api doesn't support proxy.
ewelink-api
What was checked: src/mixins/getCredentials.js
src/mixins/getCredentials.js
const request = await fetch(`${this.getApiUrl()}/user/login`, { method: 'post', headers: { Authorization: `Sign ${makeAuthorizationSign(body)}` }, body: JSON.stringify(body), });
src/mixins/makeRequest.js
const payload = { method, headers: { Authorization: `Bearer ${this.at}`, 'Content-Type': 'application/json', }, }; ... const request = await fetch(requestUrl, payload); };
This could be solved in several ways, but most simple is to add package https-proxy-agent (see node-https-proxy-agent). @skydiver Let me know if you interesting to implement or approve PR to support proxy functionality.
https-proxy-agent
@belichuk sorry for the delay on the response 😳
today version 3.1 was merged and released, you're welcome to open that PR (if still interested)
I used proxy in my local network for security reasons. But
ewelink-api
doesn't support proxy.What was checked:
src/mixins/getCredentials.js
src/mixins/makeRequest.js
This could be solved in several ways, but most simple is to add package
https-proxy-agent
(see node-https-proxy-agent). @skydiver Let me know if you interesting to implement or approve PR to support proxy functionality.