-
-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added proxy complience * fixed linter issues * updated test case * excluded for the time being test cases related to reinstalltion in mac * updated * excluded when files are installed * increased timeout for post is reacheble to 2500ms * fixed linter issues * increased to 3500 * changed history for complience with breaking change
- Loading branch information
Showing
13 changed files
with
132 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const { HttpsProxyAgent } = require('https-proxy-agent'); | ||
const { HttpProxyAgent } = require('http-proxy-agent'); | ||
/** | ||
* Returns proxy agent if exist. | ||
* @param {string} url | ||
* @returns {any} | ||
*/ | ||
function getProxtAgent(url) { | ||
if (url.startsWith('http:') && process.env.HTTP_PROXY) { | ||
const httpProxyAgent = new HttpProxyAgent(process.env.HTTP_PROXY); | ||
return { agent: { http: httpProxyAgent } }; | ||
} | ||
if (url.startsWith('https:') && process.env.HTTPS_PROXY) { | ||
const httpProxyAgent = new HttpsProxyAgent(process.env.HTTPS_PROXY); | ||
return { agent: { https: httpProxyAgent } }; | ||
} | ||
return {}; | ||
} | ||
module.exports = { getProxtAgent }; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.