debug = function () {}
n/a
function httpOverHttp(options) { var agent = new TunnelingAgent(options); agent.request = http.request; return agent; }
...
$ npm install tunnel
## Usages
### HTTP over HTTP tunneling
```javascript
var tunnelingAgent = tunnel.httpOverHttp({
maxSockets: poolSize, // Defaults to 5
proxy: { // Proxy settings
host: proxyHost, // Defaults to 'localhost'
port: proxyPort, // Defaults to 80
localAddress: localAddress, // Local interface if necessary
...
function httpOverHttps(options) { var agent = new TunnelingAgent(options); agent.request = https.request; return agent; }
...
agent: tunnelingAgent
});
```
### HTTP over HTTPS tunneling
```javascript
var tunnelingAgent = tunnel.httpOverHttps({
maxSockets: poolSize, // Defaults to 5
proxy: { // Proxy settings
host: proxyHost, // Defaults to 'localhost'
port: proxyPort, // Defaults to 443
localAddress: localAddress, // Local interface if necessary
...
function httpsOverHttp(options) { var agent = new TunnelingAgent(options); agent.request = http.request; agent.createSocket = createSecureSocket; return agent; }
...
# node-tunnel - HTTP/HTTPS Agents for tunneling proxies
## Example
```javascript
var tunnel = require('tunnel');
var tunnelingAgent = tunnel.httpsOverHttp({
proxy: {
host: 'localhost',
port: 3128
}
});
var req = https.request({
...
function httpsOverHttps(options) { var agent = new TunnelingAgent(options); agent.request = https.request; agent.createSocket = createSecureSocket; return agent; }
...
agent: tunnelingAgent
});
```
### HTTPS over HTTPS tunneling
```javascript
var tunnelingAgent = tunnel.httpsOverHttps({
maxSockets: poolSize, // Defaults to 5
// CA for origin server if necessary
ca: [ fs.readFileSync('origin-server-ca.pem')],
// Client certification for origin server if necessary
key: fs.readFileSync('origin-server-key.pem'),
...
debug = function () {}
n/a
function httpOverHttp(options) { var agent = new TunnelingAgent(options); agent.request = http.request; return agent; }
...
$ npm install tunnel
## Usages
### HTTP over HTTP tunneling
```javascript
var tunnelingAgent = tunnel.httpOverHttp({
maxSockets: poolSize, // Defaults to 5
proxy: { // Proxy settings
host: proxyHost, // Defaults to 'localhost'
port: proxyPort, // Defaults to 80
localAddress: localAddress, // Local interface if necessary
...
function httpOverHttps(options) { var agent = new TunnelingAgent(options); agent.request = https.request; return agent; }
...
agent: tunnelingAgent
});
```
### HTTP over HTTPS tunneling
```javascript
var tunnelingAgent = tunnel.httpOverHttps({
maxSockets: poolSize, // Defaults to 5
proxy: { // Proxy settings
host: proxyHost, // Defaults to 'localhost'
port: proxyPort, // Defaults to 443
localAddress: localAddress, // Local interface if necessary
...
function httpsOverHttp(options) { var agent = new TunnelingAgent(options); agent.request = http.request; agent.createSocket = createSecureSocket; return agent; }
...
# node-tunnel - HTTP/HTTPS Agents for tunneling proxies
## Example
```javascript
var tunnel = require('tunnel');
var tunnelingAgent = tunnel.httpsOverHttp({
proxy: {
host: 'localhost',
port: 3128
}
});
var req = https.request({
...
function httpsOverHttps(options) { var agent = new TunnelingAgent(options); agent.request = https.request; agent.createSocket = createSecureSocket; return agent; }
...
agent: tunnelingAgent
});
```
### HTTPS over HTTPS tunneling
```javascript
var tunnelingAgent = tunnel.httpsOverHttps({
maxSockets: poolSize, // Defaults to 5
// CA for origin server if necessary
ca: [ fs.readFileSync('origin-server-ca.pem')],
// Client certification for origin server if necessary
key: fs.readFileSync('origin-server-key.pem'),
...