Skip to content

Commit db110b3

Browse files
authored
Merge pull request #13 from aschlosser-tf/master
Add proxy support using npm config options proxy and https-proxy
2 parents f1e1b77 + 80ba0bd commit db110b3

File tree

5 files changed

+1033
-982
lines changed

5 files changed

+1033
-982
lines changed

README.MD

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ execFile(chromium.path, ['https://google.com'], err => {
3030
});
3131
```
3232

33+
### Proxy Configuration
34+
When downloading the chromium binary **node-chromium** will use the proxy configured for `npm` to establish HTTP(S) connections. The proxy used by `npm` can be configured using
35+
```
36+
npm config set proxy http://<username>:<password>@<the.proxy.hostname>:<port>
37+
npm config set https-proxy http://<username>:<password>@<the.proxy.hostname>:<port
38+
```
39+
3340
## Selenium WebDriver Headless (without UI) tests
3441
It's extremely easy to use **node-chromium** with **selenium-webdriver** to perform e2e tests without spawning browser UI.
3542
First, install all dependencies
@@ -75,6 +82,7 @@ async function takeScreenshot(driver, name) {
7582

7683
start();
7784
```
85+
##
7886

7987
## License
8088
MIT

install.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ async function downloadChromiumRevision(revision) {
3333

3434
function _downloadFile(url, destPath) {
3535
return new Promise((resolve, reject) => {
36-
got.stream(url)
36+
got.stream(url, utils.getRequestOptions(url))
3737
.on('error', error => {
3838
console.error('An error occurred while trying to download file', error.message);
3939
reject(error);

0 commit comments

Comments
 (0)