{"id":15687805,"url":"https://github.com/orisano/osniffer","last_synced_at":"2025-03-30T11:42:20.671Z","repository":{"id":57316578,"uuid":"92744421","full_name":"orisano/osniffer","owner":"orisano","description":null,"archived":false,"fork":false,"pushed_at":"2021-03-24T13:27:11.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T05:34:31.022Z","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/orisano.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-29T13:50:36.000Z","updated_at":"2021-03-24T13:27:15.000Z","dependencies_parsed_at":"2022-09-18T20:51:19.181Z","dependency_job_id":null,"html_url":"https://github.com/orisano/osniffer","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/orisano%2Fosniffer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orisano%2Fosniffer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orisano%2Fosniffer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orisano%2Fosniffer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orisano","download_url":"https://codeload.github.com/orisano/osniffer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246314125,"owners_count":20757457,"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-10-03T17:51:11.216Z","updated_at":"2025-03-30T11:42:20.645Z","avatar_url":"https://github.com/orisano.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# osniffer\nHTTP通信を覗き見るためのプロキシを作るライブラリです.\n\n## Install\n```bash\nnpm install osniffer\n```\n\n## Requirements\nNode.js \u003e= 7.6.0\n\n## Example\ncontent-typeがapplication/jsonの通信をconsoleに出力する例\n```js\nconst zlib = require(\"zlib\");\n\nconst es = require(\"event-stream\");\n\nconst Sniffer = require(\"osniffer\");\nconst sniffer = new Sniffer();\n\nsniffer.use(async (ctx, next) =\u003e {\n    if (ctx.response.headers[\"content-type\"] === \"application/json\") {\n        await next();\n    }\n});\nsniffer.use(async (ctx, next) =\u003e {\n    ctx.response\n        .pipe(zlib.createGunzip())\n        .pipe(es.wait())\n        .pipe(es.parse())\n        .pipe(es.map(x =\u003e console.log(x)));\n    await next();\n});\nsniffer.listen(8080);\n```\n\n## Author\nNao Yonashiro (@orisano)\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forisano%2Fosniffer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forisano%2Fosniffer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forisano%2Fosniffer/lists"}