diff --git a/src/main/api.js b/src/main/api.js index f254db4..8f3195a 100644 --- a/src/main/api.js +++ b/src/main/api.js @@ -6,6 +6,7 @@ async function sendRequest(action = "GET", method, body) { let apiToken = Store.get("deezer.apiToken"); let sessionId = Store.get("deezer.sessionId"); + let proxyConfig = Store.get("proxy"); try { // Send request let response = await Axios.request({ @@ -14,7 +15,8 @@ async function sendRequest(action = "GET", method, body) { Cookie: `sid=${sessionId};` }, method: action, - data: body + data: body, + proxy: proxyConfig }); return response; @@ -145,4 +147,4 @@ export default { sendAutocompleteRequest, sendSearchRequest, testConnection -} \ No newline at end of file +} diff --git a/src/main/config.default.json b/src/main/config.default.json index 35a750d..f86ff05 100644 --- a/src/main/config.default.json +++ b/src/main/config.default.json @@ -8,5 +8,14 @@ "quality": 1, "directory": null, "library": [] + }, + "proxy": { + "protocol": null, + "host": null, + "port": null, + "auth": { + "username": null, + "password": null + } } -} \ No newline at end of file +}