# Python reverse proxy.
## 安装
你可以从 [pypi](https://pypi.org/project/python-reverse-proxy/) 安装
```console
pip install -U python-reverse-proxy
```
## 用法
### 作为模块使用
```python
from reverse_proxy import make_application
```
### 命令行使用
```console
$ proxy -h
usage: reverse_proxy [-h] [-H HOST] [-P PORT] [-m {,r,w,rw}] [-d] [-c CONFIG] [-v] [base-url]
🌍🚢 python 反向代理服务 🕷️🕸️
positional arguments:
base-url 被代理的服务的 base_url,默认值:'http://localhost'
options:
-h, --help show this help message and exit
-H HOST, --host HOST ip 或 hostname,默认值:'0.0.0.0'
-P PORT, --port PORT 端口号,默认值:8888,如果为 0 则自动确定
-m {,r,w,rw}, --ws-mode {,r,w,rw}
websocket 的读写模式,'r' 为可读,'w' 为可写
-d, --debug 启用 debug 模式(会输出更详细的信息)
-c CONFIG, --config CONFIG
将被作为 JSON 解析然后作为关键字参数传给 `uvicorn.run`
-v, --version 输出版本号
```
Raw data
{
"_id": null,
"home_page": "https://github.com/ChenyangGao/web-mount-packs/tree/main/python-module/python-reverse-proxy",
"name": "python-reverse-proxy",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": "reverse proxy",
"author": "ChenyangGao",
"author_email": "wosiwujm@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/ba/1d/5a571ca038ba6de631df00689f7c05885e7c3272aa6e9406e4e2001d1ab3/python_reverse_proxy-0.0.9.4.tar.gz",
"platform": null,
"description": "# Python reverse proxy.\n\n## \u5b89\u88c5\n\n\u4f60\u53ef\u4ee5\u4ece [pypi](https://pypi.org/project/python-reverse-proxy/) \u5b89\u88c5\n\n```console\npip install -U python-reverse-proxy\n```\n\n## \u7528\u6cd5\n\n### \u4f5c\u4e3a\u6a21\u5757\u4f7f\u7528\n\n```python\nfrom reverse_proxy import make_application\n```\n\n### \u547d\u4ee4\u884c\u4f7f\u7528\n\n```console\n$ proxy -h\nusage: reverse_proxy [-h] [-H HOST] [-P PORT] [-m {,r,w,rw}] [-d] [-c CONFIG] [-v] [base-url]\n\n\t\t\ud83c\udf0d\ud83d\udea2 python \u53cd\u5411\u4ee3\u7406\u670d\u52a1 \ud83d\udd77\ufe0f\ud83d\udd78\ufe0f\n\npositional arguments:\n base-url \u88ab\u4ee3\u7406\u7684\u670d\u52a1\u7684 base_url\uff0c\u9ed8\u8ba4\u503c\uff1a'http://localhost'\n\noptions:\n -h, --help show this help message and exit\n -H HOST, --host HOST ip \u6216 hostname\uff0c\u9ed8\u8ba4\u503c\uff1a'0.0.0.0'\n -P PORT, --port PORT \u7aef\u53e3\u53f7\uff0c\u9ed8\u8ba4\u503c\uff1a8888\uff0c\u5982\u679c\u4e3a 0 \u5219\u81ea\u52a8\u786e\u5b9a\n -m {,r,w,rw}, --ws-mode {,r,w,rw}\n websocket \u7684\u8bfb\u5199\u6a21\u5f0f\uff0c'r' \u4e3a\u53ef\u8bfb\uff0c'w' \u4e3a\u53ef\u5199\n -d, --debug \u542f\u7528 debug \u6a21\u5f0f\uff08\u4f1a\u8f93\u51fa\u66f4\u8be6\u7ec6\u7684\u4fe1\u606f\uff09\n -c CONFIG, --config CONFIG\n \u5c06\u88ab\u4f5c\u4e3a JSON \u89e3\u6790\u7136\u540e\u4f5c\u4e3a\u5173\u952e\u5b57\u53c2\u6570\u4f20\u7ed9 `uvicorn.run`\n -v, --version \u8f93\u51fa\u7248\u672c\u53f7\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python reverse proxy.",
"version": "0.0.9.4",
"project_urls": {
"Homepage": "https://github.com/ChenyangGao/web-mount-packs/tree/main/python-module/python-reverse-proxy",
"Repository": "https://github.com/ChenyangGao/web-mount-packs/tree/main/python-module/python-reverse-proxy"
},
"split_keywords": [
"reverse",
"proxy"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3e1ee85af7855f9451f4e3ec6966466a5f40bf9e24e71ba2cfed28b8f0b2f429",
"md5": "b858fc25f47300ffd2feb601e72d8247",
"sha256": "17773623f4d82ed67ab4f8781e5959eabd277a9023fd667539941f0953fc5a93"
},
"downloads": -1,
"filename": "python_reverse_proxy-0.0.9.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b858fc25f47300ffd2feb601e72d8247",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 10494,
"upload_time": "2024-12-29T09:54:30",
"upload_time_iso_8601": "2024-12-29T09:54:30.875918Z",
"url": "https://files.pythonhosted.org/packages/3e/1e/e85af7855f9451f4e3ec6966466a5f40bf9e24e71ba2cfed28b8f0b2f429/python_reverse_proxy-0.0.9.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ba1d5a571ca038ba6de631df00689f7c05885e7c3272aa6e9406e4e2001d1ab3",
"md5": "207e82db50fdf345198490e8f288de44",
"sha256": "9274c70ae023602390547265174dce39695892891c897591344b7a8aa06fa30a"
},
"downloads": -1,
"filename": "python_reverse_proxy-0.0.9.4.tar.gz",
"has_sig": false,
"md5_digest": "207e82db50fdf345198490e8f288de44",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 8142,
"upload_time": "2024-12-29T09:54:33",
"upload_time_iso_8601": "2024-12-29T09:54:33.267692Z",
"url": "https://files.pythonhosted.org/packages/ba/1d/5a571ca038ba6de631df00689f7c05885e7c3272aa6e9406e4e2001d1ab3/python_reverse_proxy-0.0.9.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-29 09:54:33",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ChenyangGao",
"github_project": "web-mount-packs",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "python-reverse-proxy"
}