{"id":18544728,"url":"https://github.com/131/httpaddr","last_synced_at":"2025-10-17T01:39:32.888Z","repository":{"id":57268462,"uuid":"135168266","full_name":"131/httpaddr","owner":"131","description":"Filter http remote address through proxies \u0026 CIDR masks","archived":false,"fork":false,"pushed_at":"2018-05-28T14:54:15.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-15T05:35:06.264Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/131.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-05-28T13:59:26.000Z","updated_at":"2018-05-28T14:54:12.000Z","dependencies_parsed_at":"2022-09-02T02:50:21.253Z","dependency_job_id":null,"html_url":"https://github.com/131/httpaddr","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/131/httpaddr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fhttpaddr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fhttpaddr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fhttpaddr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fhttpaddr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/131","download_url":"https://codeload.github.com/131/httpaddr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fhttpaddr/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261080561,"owners_count":23106597,"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-11-06T20:17:26.993Z","updated_at":"2025-10-17T01:39:27.829Z","avatar_url":"https://github.com/131.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/131/httpaddr.svg?branch=master)](https://travis-ci.org/131/httpaddr)\r\n[![Coverage Status](https://coveralls.io/repos/github/131/httpaddr/badge.svg?branch=master)](https://coveralls.io/github/131/httpaddr?branch=master)\r\n[![Version](https://img.shields.io/npm/v/httpaddr.svg)](https://www.npmjs.com/package/httpaddr)\r\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)\r\n[![Code style](https://img.shields.io/badge/code%2fstyle-ivs-green.svg)](https://www.npmjs.com/package/eslint-plugin-ivs)\r\n\r\n\r\n# Motivation\r\n\r\nFilter HTTP remote address through a list of CIDR (with proxies white list support)\r\n\r\n# API\r\n\r\n```\r\n\r\nconst allow = require('httpaddr');\r\n\r\n\r\nvar server = http.createServer(function(req, res) {\r\n  var allowed = allow(req, [\"127.0.0.1/32\"]);\r\n  console.log(\"Allow only from localhost\");\r\n\r\n  var allowedproxy = allow(req, [\"127.0.0.1/32\"], [\"someproxies/24\"]);\r\n  console.log(\"Allow only from allowedproxy\");\r\n});\r\n\r\n\r\nserver.listen(8080);\r\n\r\n```\r\n\r\n# Notes\r\nCIDR are filtered through the [ipaddr.js module](https://www.npmjs.com/package/ipaddr.js)\r\n\r\n\r\n\r\n\r\n# Credits \r\n* [131](https://github.com/131)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F131%2Fhttpaddr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F131%2Fhttpaddr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F131%2Fhttpaddr/lists"}