Skip to content

Commit

Permalink
Add proxy support using global-tunnel module (using "http_proxy" env …
Browse files Browse the repository at this point in the history
…var)
  • Loading branch information
iamigo committed Jan 30, 2018
1 parent b219d45 commit 9705602
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ rc.addAspect({
});
```

## Proxy

If you need to specify a proxy for communication to Refocus, set environment variable "http_proxy".

## API

- [Aspects](docs/api/aspects.md)
Expand Down
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
const fs = require('fs');
const req = require('./lib/requestWrapper');
const mapSeries = require('promise-map-series');
const globalTunnel = require('global-tunnel');

/* Set up proxy using the "http_proxy" environment variable. */
globalTunnel.initialize();

/**
* RefocusClient wraps some basic Refocus API functionality.
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"mocha-lcov-reporter": "^1.2.0"
},
"dependencies": {
"global-tunnel": "^1.2.0",
"promise-map-series": "^0.2.3",
"request": "^2.76.0",
"request-promise": "^4.1.1"
Expand Down

0 comments on commit 9705602

Please sign in to comment.