{"id":20723892,"url":"https://github.com/ying32/rproxy","last_synced_at":"2025-09-06T00:39:14.841Z","repository":{"id":83374932,"uuid":"78506577","full_name":"ying32/rproxy","owner":"ying32","description":"简单的反向代理用于内网穿透，支持HTTP/HTTPS转发","archived":false,"fork":false,"pushed_at":"2020-04-14T05:15:15.000Z","size":836,"stargazers_count":136,"open_issues_count":0,"forks_count":34,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-08-14T08:57:13.551Z","etag":null,"topics":["http","https","proxy","reverseproxy","rproxy"],"latest_commit_sha":null,"homepage":"","language":"Go","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/ying32.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-10T06:56:54.000Z","updated_at":"2025-04-23T14:37:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"fc009e13-1870-4ce7-b32e-872f70aa349c","html_url":"https://github.com/ying32/rproxy","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/ying32/rproxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ying32%2Frproxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ying32%2Frproxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ying32%2Frproxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ying32%2Frproxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ying32","download_url":"https://codeload.github.com/ying32/rproxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ying32%2Frproxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273842839,"owners_count":25177920,"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","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["http","https","proxy","reverseproxy","rproxy"],"created_at":"2024-11-17T04:10:10.726Z","updated_at":"2025-09-06T00:39:14.807Z","avatar_url":"https://github.com/ying32.png","language":"Go","readme":"# rproxy\n## 简单的反向代理用于内网穿透  \n\n**特别注意，此工具只适合小文件类的访问测试，用来做做数据调试。当初也只是用于微信公众号开发，所以定位也是如此(注：目前代码中限制一个包最大为4M)** \n\n### 前言\t  \n\n最近周末闲来无事，想起了做下微信公共号的开发，但微信限制只能80端口的，自己用的城中村的那种宽带，共用一个公网，没办法自己用路由做端口映射。自己的服务器在腾讯云上，每次都要编译完后用ftp上传再进行调试，非常的浪费时间。 一时间又不知道上哪找一个符合我的这种要求的工具，就索性自己构思了下，整个工作流程大致为：   \n\n### 工作原理  \n\n外部请求自己服务器上的HTTP服务端 -\u003e 将数据传递给Socket服务器 -\u003e Socket服务器将数据发送至已连接的Socket客户端 -\u003e Socket客户端收到数据 -\u003e 使用http请求本地http服务端 -\u003e 本地http服务端处理相关后返回 -\u003e Socket客户端将返回的数据发送至Socket服务端 -\u003e Socket服务端解析出数据后原路返回至外部请求的HTTP  \n \n\n### 使用方法  \n\n\u003e 1、go get github.com/ying32/rproxy  \n\u003e 2、使用[构建命令](build)  \n\u003e 3、参照[命令行用例](#命令行用例)使用，或者使用[带GUI的客户端](#带GUI的客户端)\n\n\n### 命令行说明   \n```bash\n  --tcpport      # Socket连接或者监听的端口。   \n  --httpport     # 当mode为server时为服务端监听端口，当为mode为client时为转发至本地客户端的端口。  \n  --mode         # 启动模式，可选为client、server，默认为client。  \n  --svraddr      # 当mode为client时有效，为连接服务器的地址，不需要填写端口。    \n  --vkey         # 客户端与服务端建立连接时校验的加密key，简单的。  \n  ### 以下参数为v0.6版本及之后的\n  --ishttps      # httpPort端口是否只用作HTTPS监听，默认为false。    \n  --tlscafile    # 当ishttps为true时，所需的CA根证书文件。可为空，根据实际情况确定。  \n  --tlscertfile  # 当ishttps为true时，所需求的TLS证书文件。  \n  --tlskeyfile   # 当ishttps为true时，所需求的TLS密匙文件。  \n  --iszip        # 是否开启zip压缩\n  --cfgfile      # 使用指定的配置文件中的参数，此时只有mode参数有效   \n```\n\n### 用例  \n\n#### 命令行用例\n* HTTP：\n```bash\n## ---- 从命令行加载主要参数 ----\n# 服务端\nrproxy --tcpport=8285 --httpport=8286 --mode=\"server\" --vkey=\"DKibZF5TXvic1g3kY\" \n\n# 客户端\nrproxy --tcpport=8285 --httpport=8080 --svraddr=\"127.0.0.1\" --vkey=\"DKibZF5TXvic1g3kY\"\n\n## ---- 从配置文件加载主要参数 ----\n# 服务端\nrproxy --mode=\"server\" --cfgfile=\"./conf/config.cfg\"\n\n# 客户端\nrproxy --cfgfile=\"./conf/config.cfg\"\n```  \n\n* HTTPS\n```bash\n## ---- 从命令行加载主要参数 ----\n# 服务端\nrproxy --tcpport=8285 --httpport=8286 --mode=\"server\" --ishttps=true --tlscafile=\"./cert/ca.pem\" --tlscertfile=\"./cert/server.pem\" --tlskeyfile=\"./cert/server.key\" --vkey=\"DKibZF5TXvic1g3kY\"\n\n# 客户端 \nrproxy --tcpport=8285 --httpport=8089 --svraddr=\"127.0.0.1\" --ishttps=true --tlscafile=\"./cert/ca.pem\" --tlscertfile=\"./cert/client.pem\" --tlskeyfile=\"./cert/client.key\" --vkey=\"DKibZF5TXvic1g3kY\"\n\n## ---- 从配置文件加载主要参数 ----\n# 服务端\nrproxy --mode=\"server\" --cfgfile=\"./conf/confighttps.cfg\"\n\n# 客户端\nrproxy --cfgfile=\"./conf/confighttps.cfg\"\n```\n\n#### 带GUI的客户端\n[查看截图](imgs)  \n\n### 操作系统支持  \n\n支持Windows、Linux、MacOSX等，无第三方依赖库。  \n\n### 二进制下载\n* v0.6带GUI https://github.com/ying32/rproxy/releases/tag/v0.6  \n* v0.5 https://github.com/ying32/rproxy/releases/tag/v0.5  \n\n \n\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fying32%2Frproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fying32%2Frproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fying32%2Frproxy/lists"}