{"id":18371110,"url":"https://github.com/welefen/ssrf-agent","last_synced_at":"2025-10-19T09:57:56.311Z","repository":{"id":57369043,"uuid":"146872873","full_name":"welefen/ssrf-agent","owner":"welefen","description":"make http(s) request to prevent SSRF","archived":false,"fork":false,"pushed_at":"2021-11-18T04:40:19.000Z","size":17,"stargazers_count":20,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T14:08:43.096Z","etag":null,"topics":["agent","dns","http","https","lookup","ssrf"],"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/welefen.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}},"created_at":"2018-08-31T09:45:25.000Z","updated_at":"2024-01-27T09:03:46.000Z","dependencies_parsed_at":"2022-09-15T21:30:24.940Z","dependency_job_id":null,"html_url":"https://github.com/welefen/ssrf-agent","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welefen%2Fssrf-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welefen%2Fssrf-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welefen%2Fssrf-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welefen%2Fssrf-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/welefen","download_url":"https://codeload.github.com/welefen/ssrf-agent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247539082,"owners_count":20955239,"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":["agent","dns","http","https","lookup","ssrf"],"created_at":"2024-11-05T23:43:01.354Z","updated_at":"2025-10-19T09:57:51.277Z","avatar_url":"https://github.com/welefen.png","language":"JavaScript","readme":"# ssrf-agent\n\nprevent SSRF in http(s) request\n\n## Install\n\n```\nnpm install ssrf-agent --save\n```\n\n## Usage\n\n```js\nconst ssrfAgent = require('ssrf-agent');\nconst request = require('request');\n// with request module\nconst url = 'http://www.welefen.com'\nrequest(url, {\n  agent: ssrfAgent(url)\n}, (err, response, body) =\u003e {\n  \n})\n```\n\n```js\nconst ssrfAgent = require('ssrf-agent');\nconst fetch = require('node-fetch');\n// with node-fetch module\nconst url = 'http://www.welefen.com'\nfetch(url, {\n  agent: ssrfAgent(url)\n}).then(res =\u003e res.text).then(data =\u003e {\n\n}).catch(err =\u003e {\n\n})\n```\n\n## Options\n\n```js\nconst getAgent = require('ssrf-agent');\nconst agent = getAgent(ipChecker, agent);\n```\n* `ipChecker(ip)` {Function} check ip is allowed, default is `require('ip').isPrivate`\n* `agent`  {String | Object} default is `http`, support `http` `https` or `agent instance`","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwelefen%2Fssrf-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwelefen%2Fssrf-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwelefen%2Fssrf-agent/lists"}