{"id":17398489,"url":"https://github.com/vweevers/auto-http-agent","last_synced_at":"2026-01-19T08:04:23.098Z","repository":{"id":40576468,"uuid":"321111852","full_name":"vweevers/auto-http-agent","owner":"vweevers","description":"Create http agent for HTTP(S)_PROXY proxies and/or keepAlive.","archived":false,"fork":false,"pushed_at":"2023-11-01T12:31:50.000Z","size":13,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-27T04:39:03.214Z","etag":null,"topics":["agent","http","http-proxy","https","https-proxy","no-proxy","nodejs","npm-package"],"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/vweevers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-13T16:44:09.000Z","updated_at":"2022-03-01T12:47:18.000Z","dependencies_parsed_at":"2024-10-23T03:24:42.186Z","dependency_job_id":null,"html_url":"https://github.com/vweevers/auto-http-agent","commit_stats":{"total_commits":6,"total_committers":2,"mean_commits":3.0,"dds":"0.33333333333333337","last_synced_commit":"7d67a029e52986ee5341017278039e54d484900d"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/vweevers/auto-http-agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fauto-http-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fauto-http-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fauto-http-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fauto-http-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vweevers","download_url":"https://codeload.github.com/vweevers/auto-http-agent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fauto-http-agent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28563272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T03:31:16.861Z","status":"ssl_error","status_checked_at":"2026-01-19T03:31:15.069Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["agent","http","http-proxy","https","https-proxy","no-proxy","nodejs","npm-package"],"created_at":"2024-10-16T14:57:25.985Z","updated_at":"2026-01-19T08:04:23.080Z","avatar_url":"https://github.com/vweevers.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# auto-http-agent\n\n**Create an [http agent](https://nodejs.org/api/http.html#http_class_http_agent) for proxies and/or keepAlive. Returns a proxy if a given URL should be proxied according to the `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` environment variables. Uses a global pool of agents for up to 8 combinations of options (for example, proxied https URLs will share an agent).**\n\n[![npm status](http://img.shields.io/npm/v/auto-http-agent.svg)](https://www.npmjs.org/package/auto-http-agent)\n[![node](https://img.shields.io/node/v/auto-http-agent.svg)](https://www.npmjs.org/package/auto-http-agent)\n![Test](https://github.com/vweevers/auto-http-agent/workflows/Test/badge.svg?branch=main)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n## Usage\n\n```js\nconst autoAgent = require('auto-http-agent')\n\nconst url = 'http://example.com'\nconst agent = autoAgent(url)\n\n// Pass to your module of choice\nrequest(url, { agent })\n```\n\n## API\n\n### `autoAgent(url[, options])`\n\nThe `url` argument is required and must either be a string or a [WHATWG `URL`](https://nodejs.org/api/url.html) instance, with an HTTP or HTTPS protocol.\n\nOptions:\n\n- `keepAlive` (boolean): reuse connections between requests, default `false`.\n\nReturns an agent or `null` if the default agent can be used (i.e. `http.globalAgent` or `https.globalAgent`). Has a fast path for the common case of not having any configured proxy. The `autoAgent` module should behave the same as good old [`request`](https://github.com/request/request) and other software. It respects the following environment variables.\n\n#### `HTTP_PROXY`\n\nA proxy URL to use for HTTP requests, e.g. `http://localhost:3000`. The proxy itself can be either HTTP or HTTPS.\n\n#### `HTTPS_PROXY`\n\nA proxy URL to use for HTTPS requests. The proxy itself can be either HTTP or HTTPS.\n\n#### `NO_PROXY`\n\nA comma-separated list of hosts (including subdomains) that should not be proxied. Supported forms:\n\n- `hostname:port`\n- `hostname` or `.hostname` or `*.hostname`\n- `*` to disable proxying for all URLs\n\n## Install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install auto-http-agent\n```\n\n## License\n\n[MIT](LICENSE) © Vincent Weevers\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvweevers%2Fauto-http-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvweevers%2Fauto-http-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvweevers%2Fauto-http-agent/lists"}