{"id":13527394,"url":"https://github.com/koichik/node-tunnel","last_synced_at":"2025-04-01T09:31:27.956Z","repository":{"id":2394158,"uuid":"3360551","full_name":"koichik/node-tunnel","owner":"koichik","description":"Node HTTP/HTTPS Agents for tunneling proxies","archived":true,"fork":false,"pushed_at":"2021-10-06T14:51:49.000Z","size":71,"stargazers_count":537,"open_issues_count":13,"forks_count":71,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-16T00:34:21.578Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/koichik.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-02-05T16:40:51.000Z","updated_at":"2025-03-13T02:55:00.000Z","dependencies_parsed_at":"2022-07-14T08:18:15.088Z","dependency_job_id":null,"html_url":"https://github.com/koichik/node-tunnel","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koichik%2Fnode-tunnel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koichik%2Fnode-tunnel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koichik%2Fnode-tunnel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koichik%2Fnode-tunnel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koichik","download_url":"https://codeload.github.com/koichik/node-tunnel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244000710,"owners_count":20381618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T06:01:47.109Z","updated_at":"2025-04-01T09:31:27.289Z","avatar_url":"https://github.com/koichik.png","language":"JavaScript","readme":"# node-tunnel - HTTP/HTTPS Agents for tunneling proxies\n\n[![Build Status](https://img.shields.io/travis/koichik/node-tunnel.svg?style=flat)](https://travis-ci.org/koichik/node-tunnel)\n[![Dependency Status](http://img.shields.io/david/koichik/node-tunnel.svg?style=flat)](https://david-dm.org/koichik/node-tunnel#info=dependencies)\n[![DevDependency Status](http://img.shields.io/david/dev/koichik/node-tunnel.svg?style=flat)](https://david-dm.org/koichik/node-tunnel#info=devDependencies)\n\n## Example\n\n```javascript\nvar tunnel = require('tunnel');\n\nvar tunnelingAgent = tunnel.httpsOverHttp({\n  proxy: {\n    host: 'localhost',\n    port: 3128\n  }\n});\n\nvar req = https.request({\n  host: 'example.com',\n  port: 443,\n  agent: tunnelingAgent\n});\n```\n\n## Installation\n\n    $ npm install tunnel\n\n## Usages\n\n### HTTP over HTTP tunneling\n\n```javascript\nvar tunnelingAgent = tunnel.httpOverHttp({\n  maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets\n\n  proxy: { // Proxy settings\n    host: proxyHost, // Defaults to 'localhost'\n    port: proxyPort, // Defaults to 80\n    localAddress: localAddress, // Local interface if necessary\n\n    // Basic authorization for proxy server if necessary\n    proxyAuth: 'user:password',\n\n    // Header fields for proxy server if necessary\n    headers: {\n      'User-Agent': 'Node'\n    }\n  }\n});\n\nvar req = http.request({\n  host: 'example.com',\n  port: 80,\n  agent: tunnelingAgent\n});\n```\n\n### HTTPS over HTTP tunneling\n\n```javascript\nvar tunnelingAgent = tunnel.httpsOverHttp({\n  maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets\n\n  // CA for origin server if necessary\n  ca: [ fs.readFileSync('origin-server-ca.pem')],\n\n  // Client certification for origin server if necessary\n  key: fs.readFileSync('origin-server-key.pem'),\n  cert: fs.readFileSync('origin-server-cert.pem'),\n\n  proxy: { // Proxy settings\n    host: proxyHost, // Defaults to 'localhost'\n    port: proxyPort, // Defaults to 80\n    localAddress: localAddress, // Local interface if necessary\n\n    // Basic authorization for proxy server if necessary\n    proxyAuth: 'user:password',\n\n    // Header fields for proxy server if necessary\n    headers: {\n      'User-Agent': 'Node'\n    },\n  }\n});\n\nvar req = https.request({\n  host: 'example.com',\n  port: 443,\n  agent: tunnelingAgent\n});\n```\n\n### HTTP over HTTPS tunneling\n\n```javascript\nvar tunnelingAgent = tunnel.httpOverHttps({\n  maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets\n\n  proxy: { // Proxy settings\n    host: proxyHost, // Defaults to 'localhost'\n    port: proxyPort, // Defaults to 443\n    localAddress: localAddress, // Local interface if necessary\n\n    // Basic authorization for proxy server if necessary\n    proxyAuth: 'user:password',\n\n    // Header fields for proxy server if necessary\n    headers: {\n      'User-Agent': 'Node'\n    },\n\n    // CA for proxy server if necessary\n    ca: [ fs.readFileSync('origin-server-ca.pem')],\n\n    // Server name for verification if necessary\n    servername: 'example.com',\n\n    // Client certification for proxy server if necessary\n    key: fs.readFileSync('origin-server-key.pem'),\n    cert: fs.readFileSync('origin-server-cert.pem'),\n  }\n});\n\nvar req = http.request({\n  host: 'example.com',\n  port: 80,\n  agent: tunnelingAgent\n});\n```\n\n### HTTPS over HTTPS tunneling\n\n```javascript\nvar tunnelingAgent = tunnel.httpsOverHttps({\n  maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets\n\n  // CA for origin server if necessary\n  ca: [ fs.readFileSync('origin-server-ca.pem')],\n\n  // Client certification for origin server if necessary\n  key: fs.readFileSync('origin-server-key.pem'),\n  cert: fs.readFileSync('origin-server-cert.pem'),\n\n  proxy: { // Proxy settings\n    host: proxyHost, // Defaults to 'localhost'\n    port: proxyPort, // Defaults to 443\n    localAddress: localAddress, // Local interface if necessary\n\n    // Basic authorization for proxy server if necessary\n    proxyAuth: 'user:password',\n\n    // Header fields for proxy server if necessary\n    headers: {\n      'User-Agent': 'Node'\n    }\n\n    // CA for proxy server if necessary\n    ca: [ fs.readFileSync('origin-server-ca.pem')],\n\n    // Server name for verification if necessary\n    servername: 'example.com',\n\n    // Client certification for proxy server if necessary\n    key: fs.readFileSync('origin-server-key.pem'),\n    cert: fs.readFileSync('origin-server-cert.pem'),\n  }\n});\n\nvar req = https.request({\n  host: 'example.com',\n  port: 443,\n  agent: tunnelingAgent\n});\n```\n\n## CONTRIBUTORS\n* [Aleksis Brezas (abresas)](https://github.com/abresas)\n* [Jackson Tian (JacksonTian)](https://github.com/JacksonTian)\n* [Dmitry Sorin (1999)](https://github.com/1999)\n\n## License\n\nLicensed under the [MIT](https://github.com/koichik/node-tunnel/blob/master/LICENSE) license.\n","funding_links":[],"categories":["Repository","JavaScript"],"sub_categories":["Network"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoichik%2Fnode-tunnel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoichik%2Fnode-tunnel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoichik%2Fnode-tunnel/lists"}