{ "info": { "author": "Danny Hermes", "author_email": "daniel.j.hermes@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7" ], "description": "# `tcp-h2-describe`\n\n> Python library and CLI for running an HTTP/2 proxy that describes each frame\n\n## Install\n\n```\npython3 -m pip install --upgrade tcp-h2-describe\n```\n\n## Usage\n\nFor example, on a machine where there is a local HTTP/2 server running on\nport 50051:\n\n```\n$ tcp-h2-describe --server-port 50051\nStarting tcp-h2-describe proxy server on port 24909\n Proxying server located at localhost:50051\n...\n$ # OR\n$ python -m tcp_h2_describe --server-port 50051\nStarting tcp-h2-describe proxy server on port 24909\n Proxying server located at localhost:50051\n...\n```\n\nOptions also exist to customize the port where the `tcp-h2-describe` proxy\nruns as well as the remote server that is being proxied:\n\n```\n$ python -m tcp_h2_describe --help\nusage: tcp-h2-describe [-h] [--proxy-port PROXY_PORT]\n [--server-host SERVER_HOST] [--server-port SERVER_PORT]\n\nRun `tcp-h2-describe` reverse proxy server. This will forward traffic to a\nproxy port along to an already running HTTP/2 server. For each HTTP/2 frame\nforwarded (either client->server or server->client) a description will be\nprinted to the console explaining what each byte in the frame means.\n\noptional arguments:\n -h, --help show this help message and exit\n --proxy-port PROXY_PORT\n The port that will be used for running the \"describe\"\n proxy. (default: 24909)\n --server-host SERVER_HOST\n The hostname for the server that is being proxied.\n (default: None)\n --server-port SERVER_PORT\n The port for the server that is being proxied.\n (default: 80)\n```\n\nTo use directly from Python code\n\n```python\nimport tcp_h2_describe\n\nproxy_port = 13370\nserver_port = 50051\ntcp_h2_describe.serve_proxy(proxy_port, server_port)\n\n# OR: Spawn a thread to avoid blocking\nimport threading\n\nserver_thread = threading.Thread(\n target=tcp_h2_describe.serve_proxy,\n args=(proxy_port, server_port),\n)\nserver_thread.start()\n```\n\nSee example output when proxying an [HTTP server][3] and a [gRPC server][4].\nAdditionally, the `tcp-h2-describe` proxy supports the [proxy protocol][5].\n\n## Development\n\nTo work on adding a feature or to run the tests, see the [DEVELOPMENT doc][1]\nfor more information on how to get started.\n\n## License\n\n`tcp-h2-describe` is made available under the Apache 2.0 License. For more\ndetails, see the [LICENSE][2].\n\n[1]: https://github.com/dhermes/tcp-h2-describe/blob/0.1.0/README.md\n[2]: https://github.com/dhermes/tcp-h2-describe/blob/0.1.0/LICENSE\n[3]: https://github.com/dhermes/tcp-h2-describe/blob/0.1.0/EXAMPLE-HTTP.md\n[4]: https://github.com/dhermes/tcp-h2-describe/blob/0.1.0/EXAMPLE-gRPC.md\n[5]: https://github.com/dhermes/tcp-h2-describe/blob/0.1.0/EXAMPLE-PROXY-PROTOCOL.md\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dhermes/tcp-h2-describe", "keywords": "TCP,HTTP/2,Networking,Proxy", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "tcp-h2-describe", "package_url": "https://pypi.org/project/tcp-h2-describe/", "platform": "Posix; macOS; Windows", "project_url": "https://pypi.org/project/tcp-h2-describe/", "project_urls": { "Homepage": "https://github.com/dhermes/tcp-h2-describe", "Issue Tracker": "https://github.com/dhermes/tcp-h2-describe" }, "release_url": "https://pypi.org/project/tcp-h2-describe/0.1.0/", "requires_dist": [ "hpack (>=3.0.0)" ], "requires_python": "", "summary": "Python library and CLI for running an HTTP/2 proxy that describes each frame", "version": "0.1.0" }, "last_serial": 5728126, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "9fe434bd8fdc302628a3b053267fda5d", "sha256": "29c76d7b8e1aacd9ca061953394a5aca9e1758873139b50238047187010d0638" }, "downloads": -1, "filename": "tcp-h2-describe-0.0.1.tar.gz", "has_sig": false, "md5_digest": "9fe434bd8fdc302628a3b053267fda5d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8206, "upload_time": "2019-08-20T22:48:36", "url": "https://files.pythonhosted.org/packages/59/96/68da1dbc401678b77cb85c56a880de726e6737977806f836a4c382741882/tcp-h2-describe-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "e20172493db16bdb86ee25a44e798074", "sha256": "c6852d495f849aa63c2325d0561441ba480bc0c2646170d7ed1e5fbfcae98563" }, "downloads": -1, "filename": "tcp-h2-describe-0.0.2.tar.gz", "has_sig": false, "md5_digest": "e20172493db16bdb86ee25a44e798074", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16073, "upload_time": "2019-08-21T06:39:28", "url": "https://files.pythonhosted.org/packages/36/05/3ff22654e41070d7093a51ada5ea8c8ce57047e72e1baadf279977f533b0/tcp-h2-describe-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "c478e8613c12844a518b812ade20a52a", "sha256": "83af957438311cf38c92a68b35f2e1a96902af49102149f739ae608cc0e15bc4" }, "downloads": -1, "filename": "tcp-h2-describe-0.0.3.tar.gz", "has_sig": false, "md5_digest": "c478e8613c12844a518b812ade20a52a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14895, "upload_time": "2019-08-22T06:48:09", "url": "https://files.pythonhosted.org/packages/ff/4c/65b1951a75505a8abbf5f47efb6c5a57e965664af6f58237a4f64053eb3e/tcp-h2-describe-0.0.3.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "54d575cd76371c7849f6efc8d5d3c6e3", "sha256": "635f9652dfa33b823c3e04f5285d318065d9ae49e71cd71556f7112988e235df" }, "downloads": -1, "filename": "tcp_h2_describe-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "54d575cd76371c7849f6efc8d5d3c6e3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 24241, "upload_time": "2019-08-25T22:12:16", "url": "https://files.pythonhosted.org/packages/d5/62/c59a93e978d9ab31205424763b834008fc360616188000520dff4231ddcf/tcp_h2_describe-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1885171d2aa4ca59ffdd43af2268c0be", "sha256": "2d2e8acbab348d4fc3359b18c9f8e63aee652d68c13dc4547b46c9fcbf7debd7" }, "downloads": -1, "filename": "tcp-h2-describe-0.1.0.tar.gz", "has_sig": false, "md5_digest": "1885171d2aa4ca59ffdd43af2268c0be", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19127, "upload_time": "2019-08-25T22:12:18", "url": "https://files.pythonhosted.org/packages/64/3f/fc4020b443b72bee4d1a0588dd7a7995df585afeb11c3f0a402f62a1acec/tcp-h2-describe-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "54d575cd76371c7849f6efc8d5d3c6e3", "sha256": "635f9652dfa33b823c3e04f5285d318065d9ae49e71cd71556f7112988e235df" }, "downloads": -1, "filename": "tcp_h2_describe-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "54d575cd76371c7849f6efc8d5d3c6e3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 24241, "upload_time": "2019-08-25T22:12:16", "url": "https://files.pythonhosted.org/packages/d5/62/c59a93e978d9ab31205424763b834008fc360616188000520dff4231ddcf/tcp_h2_describe-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1885171d2aa4ca59ffdd43af2268c0be", "sha256": "2d2e8acbab348d4fc3359b18c9f8e63aee652d68c13dc4547b46c9fcbf7debd7" }, "downloads": -1, "filename": "tcp-h2-describe-0.1.0.tar.gz", "has_sig": false, "md5_digest": "1885171d2aa4ca59ffdd43af2268c0be", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19127, "upload_time": "2019-08-25T22:12:18", "url": "https://files.pythonhosted.org/packages/64/3f/fc4020b443b72bee4d1a0588dd7a7995df585afeb11c3f0a402f62a1acec/tcp-h2-describe-0.1.0.tar.gz" } ] }