aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/node_modules/tunnel/README.md
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2022-12-11 15:42:38 +0100
committerEgor Tensin <Egor.Tensin@gmail.com>2022-12-11 15:42:38 +0100
commit9857fae4d1136ef2ebfeffaaaf6ba22e1015401a (patch)
tree8d88c98d2100e29b668df3845088565cde9d80c6 /node_modules/tunnel/README.md
parentbump Node version (diff)
downloadcleanup-path-9857fae4d1136ef2ebfeffaaaf6ba22e1015401a.tar.gz
cleanup-path-9857fae4d1136ef2ebfeffaaaf6ba22e1015401a.zip
upgrade actions/core
Diffstat (limited to 'node_modules/tunnel/README.md')
-rw-r--r--node_modules/tunnel/README.md185
1 files changed, 185 insertions, 0 deletions
diff --git a/node_modules/tunnel/README.md b/node_modules/tunnel/README.md
new file mode 100644
index 0000000..f54bca5
--- /dev/null
+++ b/node_modules/tunnel/README.md
@@ -0,0 +1,185 @@
+# node-tunnel - HTTP/HTTPS Agents for tunneling proxies
+
+[![Build Status](https://img.shields.io/travis/koichik/node-tunnel.svg?style=flat)](https://travis-ci.org/koichik/node-tunnel)
+[![Dependency Status](http://img.shields.io/david/koichik/node-tunnel.svg?style=flat)](https://david-dm.org/koichik/node-tunnel#info=dependencies)
+[![DevDependency Status](http://img.shields.io/david/dev/koichik/node-tunnel.svg?style=flat)](https://david-dm.org/koichik/node-tunnel#info=devDependencies)
+
+## Example
+
+```javascript
+var tunnel = require('tunnel');
+
+var tunnelingAgent = tunnel.httpsOverHttp({
+ proxy: {
+ host: 'localhost',
+ port: 3128
+ }
+});
+
+var req = https.request({
+ host: 'example.com',
+ port: 443,
+ agent: tunnelingAgent
+});
+```
+
+## Installation
+
+ $ npm install tunnel
+
+## Usages
+
+### HTTP over HTTP tunneling
+
+```javascript
+var tunnelingAgent = tunnel.httpOverHttp({
+ maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets
+
+ proxy: { // Proxy settings
+ host: proxyHost, // Defaults to 'localhost'
+ port: proxyPort, // Defaults to 80
+ localAddress: localAddress, // Local interface if necessary
+
+ // Basic authorization for proxy server if necessary
+ proxyAuth: 'user:password',
+
+ // Header fields for proxy server if necessary
+ headers: {
+ 'User-Agent': 'Node'
+ }
+ }
+});
+
+var req = http.request({
+ host: 'example.com',
+ port: 80,
+ agent: tunnelingAgent
+});
+```
+
+### HTTPS over HTTP tunneling
+
+```javascript
+var tunnelingAgent = tunnel.httpsOverHttp({
+ maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets
+
+ // 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'),
+ cert: fs.readFileSync('origin-server-cert.pem'),
+
+ proxy: { // Proxy settings
+ host: proxyHost, // Defaults to 'localhost'
+ port: proxyPort, // Defaults to 80
+ localAddress: localAddress, // Local interface if necessary
+
+ // Basic authorization for proxy server if necessary
+ proxyAuth: 'user:password',
+
+ // Header fields for proxy server if necessary
+ headers: {
+ 'User-Agent': 'Node'
+ },
+ }
+});
+
+var req = https.request({
+ host: 'example.com',
+ port: 443,
+ agent: tunnelingAgent
+});
+```
+
+### HTTP over HTTPS tunneling
+
+```javascript
+var tunnelingAgent = tunnel.httpOverHttps({
+ maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets
+
+ proxy: { // Proxy settings
+ host: proxyHost, // Defaults to 'localhost'
+ port: proxyPort, // Defaults to 443
+ localAddress: localAddress, // Local interface if necessary
+
+ // Basic authorization for proxy server if necessary
+ proxyAuth: 'user:password',
+
+ // Header fields for proxy server if necessary
+ headers: {
+ 'User-Agent': 'Node'
+ },
+
+ // CA for proxy server if necessary
+ ca: [ fs.readFileSync('origin-server-ca.pem')],
+
+ // Server name for verification if necessary
+ servername: 'example.com',
+
+ // Client certification for proxy server if necessary
+ key: fs.readFileSync('origin-server-key.pem'),
+ cert: fs.readFileSync('origin-server-cert.pem'),
+ }
+});
+
+var req = http.request({
+ host: 'example.com',
+ port: 80,
+ agent: tunnelingAgent
+});
+```
+
+### HTTPS over HTTPS tunneling
+
+```javascript
+var tunnelingAgent = tunnel.httpsOverHttps({
+ maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets
+
+ // 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'),
+ cert: fs.readFileSync('origin-server-cert.pem'),
+
+ proxy: { // Proxy settings
+ host: proxyHost, // Defaults to 'localhost'
+ port: proxyPort, // Defaults to 443
+ localAddress: localAddress, // Local interface if necessary
+
+ // Basic authorization for proxy server if necessary
+ proxyAuth: 'user:password',
+
+ // Header fields for proxy server if necessary
+ headers: {
+ 'User-Agent': 'Node'
+ }
+
+ // CA for proxy server if necessary
+ ca: [ fs.readFileSync('origin-server-ca.pem')],
+
+ // Server name for verification if necessary
+ servername: 'example.com',
+
+ // Client certification for proxy server if necessary
+ key: fs.readFileSync('origin-server-key.pem'),
+ cert: fs.readFileSync('origin-server-cert.pem'),
+ }
+});
+
+var req = https.request({
+ host: 'example.com',
+ port: 443,
+ agent: tunnelingAgent
+});
+```
+
+## CONTRIBUTORS
+* [Aleksis Brezas (abresas)](https://github.com/abresas)
+* [Jackson Tian (JacksonTian)](https://github.com/JacksonTian)
+* [Dmitry Sorin (1999)](https://github.com/1999)
+
+## License
+
+Licensed under the [MIT](https://github.com/koichik/node-tunnel/blob/master/LICENSE) license.