{"id":20229226,"url":"https://github.com/hisco/http2-debug","last_synced_at":"2026-03-07T18:01:39.909Z","repository":{"id":57268429,"uuid":"136230556","full_name":"hisco/http2-debug","owner":"hisco","description":"http2-debug will help you to understand if your are making http2 request from your service. It acts as an http2 echo server.","archived":false,"fork":false,"pushed_at":"2024-01-05T22:54:11.000Z","size":161,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-24T15:41:26.228Z","etag":null,"topics":["debug","docker","echo-server","http2","http2-server","nodejs"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/http2-debug","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/hisco.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-06-05T20:22:43.000Z","updated_at":"2023-03-27T00:14:16.000Z","dependencies_parsed_at":"2022-09-02T05:41:06.068Z","dependency_job_id":null,"html_url":"https://github.com/hisco/http2-debug","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/hisco%2Fhttp2-debug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hisco%2Fhttp2-debug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hisco%2Fhttp2-debug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hisco%2Fhttp2-debug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hisco","download_url":"https://codeload.github.com/hisco/http2-debug/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247809099,"owners_count":20999805,"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":["debug","docker","echo-server","http2","http2-server","nodejs"],"created_at":"2024-11-14T07:34:56.193Z","updated_at":"2026-03-07T18:01:34.849Z","avatar_url":"https://github.com/hisco.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HTTP2 debug\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/hisco/http2-debug.svg)](https://greenkeeper.io/)\n\n[![NPM Version][npm-image]][npm-url]\n[![Build Status][travis-image]][travis-url]\n\nDebug http2 client requests\n\n## Purpose\n`http2-debug` will help you to understand if your are making http2 request from your service.\nIt acts as an http2 echo server.\nIt returns in the response body the following information:\n  * Hostname (Whoami)\n  * HTTP2 headers\n  * HTTP2 body\n\nWith this information you will be able to see if the desired information was sent from your service.\n\nIt's also very helpful for HTTP2 load balancer testing.\nYou can use it to test kubernetes ingress / docker LB + http2.\n\n## Local usage\nBefore testing please make sure your version of nodejs is support http2.\nTo check your node version run on your terminal / CMD the fllowing command:\n```\nnode -v \n```\nHttp2 was added to Node.js only on later versions of \u003ev8.5 .\nIf you need to upgrade or install Node.js got to:\n[Download page of Node.js ](https://nodejs.org/en/download/)\n\nInstall this module\n```\nnpm i http2-debug -g\n```\n\nRun the following command from any folder\n```\nhttp2-debug \n```\n\nThat's it you now have an HTTP2 server running with selfsigned certificate.\nDon't forget to enable security notice.\nBy default server is lisening to 0.0.0.0:8443 .\n\n## Advanced usage\nFor custom http response you can overide the default `onStream` method.\nOveride could be done by either inheritance from the debug server or by regular assignment.\n\n```js\n    class CustomHttpDebugServer extends Http2Debug{\n      onStream(stream , headers){\n        stream.respond({\n                'content-type': 'text/html',\n                ':status': 200\n        });\n        stream.end('hi');\n      }\n    }\n    const http2Debug = new CustomHttpDebugServer;\n    http2Debug.createServer((err)=\u003e{\n        //...//\n    });\n```\n\n## HTTP2 certificates\nTo enable fast debuging, this module comes with a self signed certificate.\nTo use it you must disable security warnings.\nIn Node.jd request client just set the following options `rejectUnauthorized` to false.\n\nDetailed decription could be found here:\n[ Node.js TLS API ](https://nodejs.org/api/tls.html#tls_new_tls_tlssocket_socket_options)\n\n## API\nThe comes with some default you can overide these as you see fit\n * --host=0.0.0.0\n * --port=8443\n * --key=THE_PATH_TO_THE_KEY_FILE\n * --cert=THE_PATH_TO_THE_CERT_FILE\n\nFor example to change all configuration , run in terminal / CMD:\n```\nhttp2-debug --host=10.10.90.210 --port=443 --key=./my-key.pem  --cert=./my-cert.pem\n\n```\n\n## Run with Docker\n```\ndocker run -p 8443:8443 hisco/http2-debug\n\n```\nRegistry link [Link to hub registry](https://hub.docker.com/r/hisco/http2-debug/)\n## License\n\n  [MIT](LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/http2-debug.svg\n[npm-url]: https://npmjs.org/package/http2-debug\n[travis-image]: https://img.shields.io/travis/hisco/http2-debug/master.svg?style=flat-square\n[travis-url]: https://travis-ci.org/hisco/http2-debug","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhisco%2Fhttp2-debug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhisco%2Fhttp2-debug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhisco%2Fhttp2-debug/lists"}