{"id":13575947,"url":"https://github.com/zema1/suo5","last_synced_at":"2025-05-14T07:08:15.867Z","repository":{"id":75952797,"uuid":"569239536","full_name":"zema1/suo5","owner":"zema1","description":"一款高性能 HTTP 代理隧道工具 | A high-performance http proxy tunneling tool","archived":false,"fork":false,"pushed_at":"2025-03-24T12:12:55.000Z","size":3072,"stargazers_count":2319,"open_issues_count":4,"forks_count":216,"subscribers_count":19,"default_branch":"main","last_synced_at":"2025-04-11T02:51:26.570Z","etag":null,"topics":["chunked-encoding","http-proxy","http-socks5","proxy","socks5"],"latest_commit_sha":null,"homepage":"","language":"Java","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/zema1.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2022-11-22T11:45:26.000Z","updated_at":"2025-04-10T08:16:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"ffdf3d03-ae1f-44ce-8047-f7ea3fb4ad15","html_url":"https://github.com/zema1/suo5","commit_stats":{"total_commits":117,"total_committers":3,"mean_commits":39.0,"dds":"0.017094017094017144","last_synced_commit":"93faa01f99b1f8134751c07e4bfc532b648cbce8"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zema1%2Fsuo5","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zema1%2Fsuo5/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zema1%2Fsuo5/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zema1%2Fsuo5/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zema1","download_url":"https://codeload.github.com/zema1/suo5/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254092657,"owners_count":22013290,"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":["chunked-encoding","http-proxy","http-socks5","proxy","socks5"],"created_at":"2024-08-01T15:01:05.691Z","updated_at":"2025-05-14T07:08:15.847Z","avatar_url":"https://github.com/zema1.png","language":"Java","funding_links":[],"categories":["Java","网络编程","Go","开发工具\u0026框架"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eSuo5\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e一款高性能 HTTP 代理隧道工具\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n![License](https://img.shields.io/github/license/zema1/suo5)\n![Workflow Status](https://img.shields.io/github/actions/workflow/status/zema1/suo5/release.yml?label=release)\n![Workflow Status](https://img.shields.io/github/actions/workflow/status/zema1/suo5/test.yml?label=test)\n![Latest release](https://img.shields.io/github/v/release/zema1/suo5?label=latest)\n\n\u003c/div\u003e\n\n![experience](./tests/img/suo5.gif)\n\n[中文](./README.md) | [English](./README_EN.md)\n\n----\n\n`suo5` 是一个高性能 HTTP 隧道代理工具，它基于双向的 `Chunked-Encoding`\n构建, 相比 [Neo-reGeorg](https://github.com/L-codes/Neo-reGeorg) 等传统隧道工具, `suo5`\n的性能可以达到其数十倍。查看 [性能测试](./tests)\n\n其主要特性如下：\n\n- 同时支持全双工与半双工模式，传输性能接近 FRP\n- 支持在 Nginx 反向代理和负载均衡场景使用\n- 支持 Java4 ~ Java 21 全版本和各大主流中间件服务\n- 支持 IIS .Net Framework \u003e= 2.0 的所有版本\n- 完善的连接控制和并发管理，使用流畅丝滑\n- 同时提供提供命令行和图形化界面\n\n原理介绍 [https://koalr.me/posts/suo5-a-hign-performace-http-socks/](https://koalr.me/posts/suo5-a-hign-performace-http-socks/)\n\n\u003e 免责声明：此工具仅限于安全研究，用户承担因使用此工具而导致的所有法律和相关责任！作者不承担任何法律责任！\n\n## 安装运行\n\n前往 [Releases](https://github.com/zema1/suo5/releases) 下载编译好的二进制，其中带 `gui` 的版本是界面版，不带 `gui`\n的为命令行版。所有编译由 Github Action 自动构建，请放心使用。\n\n使用时需上传 [服务端](./assets/) 到目标环境中并确保正常执行。\n\n### 界面版\n\n界面版基于 [wails](https://github.com/wailsapp/wails) 实现，依赖 Webview2 框架。Windows 11 和 MacOS\n已自带该组件，其他系统会弹框请允许下载安装，否则无法使用。\n\n![gui.png](tests/img/gui.jpg)\n\n### 命令行\n\n```text\nUSAGE:\n   suo5 [global options] command [command options] [arguments...]\n\nGLOBAL OPTIONS:\n   --target value, -t value                               the remote server url, ex: http://localhost:8080/suo5.jsp\n   --listen value, -l value                               listen address of socks5 server (default: \"127.0.0.1:1111\")\n   --method value, -m value                               http request method (default: \"POST\")\n   --redirect value, -r value                             redirect to the url if host not matched, used to bypass load balance\n   --no-auth                                              disable socks5 authentication (default: true)\n   --auth value                                           socks5 creds, username:password, leave empty to auto generate\n   --mode value                                           connection mode, choices are auto, full, half (default: \"auto\")\n   --ua value                                             set the request User-Agent (default: \"Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.1.2.3\")\n   --header value, -H value [ --header value, -H value ]  use extra header, ex -H 'Cookie: abc'\n   --timeout value                                        request timeout in seconds (default: 10)\n   --buf-size value                                       request max body size (default: 327680)\n   --proxy value                                          set upstream proxy, support socks5/http(s), eg: socks5://127.0.0.1:7890\n   --debug, -d                                            debug the traffic, print more details (default: false)\n   --no-heartbeat, --nh                                   disable heartbeat to the remote server which will send data every 5s (default: false)\n   --no-gzip, --ng                                        disable gzip compression, which will improve compatibility with some old servers (default: false)\n   --jar, -j                                              enable cookiejar (default: false)\n   --help, -h                                             show help\n   --version, -v                                          print the version\n```\n\n命令行版本与界面版配置完全一致，可以对照界面版功能来使用，最简单的只需指定连接目标\n\n```bash\n$ ./suo5 -t https://example.com/proxy.jsp\n```\n\n使用 `GET` 方法发送请求，有时可以绕过限制\n\n```bash\n$ ./suo5 -m GET -t https://example.com/proxy.jsp\n```\n\n自定义 socks5 监听在 `0.0.0.0:7788`，并自定义认证信息为 `test:test123`\n\n```bash\n$ ./suo5 -t https://example.com/proxy.jsp -l 0.0.0.0:7788 --auth test:test123\n```\n\n负载均衡场景下将流量转发到某一个固定的 url 解决请求被分散的问题，需要尽可能的在每一个后端服务中上传 suo5。\n它的原理是判断 `-r` 中 URL 的 IP 是否与服务器的网卡 IP 匹配，不匹配则转发。\n\n```bash\n$ ./suo5 -t https://example.com/proxy.jsp -r http://172.0.3.2/code/proxy.jsp\n```\n\n配置域名/IP过滤规则，避免无意义的域名被代理, 命中规则的连接会直接被 reset 掉\n\n```bash\n# example.com 和 google.com 这两个域名不走代理\n$ ./suo5 -t https://example.com/proxy.jsp -E example.com -E google.com\n\n# 也可以将域名列表放在文件里，一行一个\n$ ./suo5 -t https://example.com/proxy.jsp -ef ./excludes.txt\n\n# 注意: 如果你配置的是域名，你需要确保 suo5 代理拿到的是域名，而不是解析好的 ip, 否则不会生效, 例如:\n# 已经解析成 IP:  curl -v -x 'socks5://127.0.0.1:1111' https://example.com\n# 仍然是域名:  curl -v -x 'socks5h://127.0.0.1:1111' https://example.com\n```\n\n### 特别提醒\n\n`User-Agent` (`ua`) 的配置本地端与服务端是绑定的，如果修改了其中一个，另一个也必须对应修改才能连接上, 你可以将这个作为连接密码使用。\n\n## 配置文件\n\n配置文件的定义来自 `ctrl.Suo5Config`, 完整的配置如下:\n\n```json\n{\n  \"method\": \"POST\",\n  \"listen\": \"127.0.0.1:1111\",\n  \"target\": \"\",\n  \"no_auth\": true,\n  \"username\": \"\",\n  \"password\": \"\",\n  \"mode\": \"auto\",\n  \"buffer_size\": 327680,\n  \"timeout\": 10,\n  \"debug\": false,\n  \"upstream_proxy\": \"\",\n  \"redirect_url\": \"\",\n  \"raw_header\": [\n    \"User-Agent: Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.1.2.3\"\n  ],\n  \"disable_heartbeat\": false,\n  \"disable_gzip\": false,\n  \"disable_cookiejar\": true,\n  \"exclude_domain\": null\n}\n```\n\nGUI 版本可以使用界面 `导入配置` 和 `导出配置` 功能来导入和导出配置文件。cli 版本可以使用 `-c` 参数来指定配置文件。\nGUI 导出的配置文件也可以给命令行使用，两者的格式是一样的。\n\n## 常见问题\n\n1. 什么是全双工和半双工?\n\n   **全双工** 仅需发送一个 HTTP 请求即可构建出一个 HTTP 隧道, 实现 TCP 的双向通信。可以理解成这个请求既是一个上传请求又是一个下载请求，只要连接不断开\n   ，就会一直下载，一直上传, 便可以借此做双向通信。\n\n   **半双工** 在部分场景下不支持 `全双工` 模式（比如有反代），可以退而求其次做半双工，即发送一个请求构建一个下行的隧道，同时用短链接发送上行数据一次来完成双向通信。\n\n2. `suo5` 和 `Neo-reGeorg` 怎么选？\n\n   如果目标是 Java 的站点，可以使用 `suo5` 来构建 http 隧道，大多数情况下 `suo5` 都要比 `neo` 更稳定速度更快。但 `neo`\n   提供了非常多种类的服务端支持，兼容性很好，而且也支持一些 `suo5` 当前还在开发的功能，也支持更灵活的定制化。\n\n## 接下来\n\n- [x] 支持配置上游 socks 代理\n- [x] 支持负载均衡的场景\n- [x] 支持 .Net 的类型\n- [ ] 流量特征去除\n\n## 参考\n\n- [https://github.com/L-codes/Neo-reGeorg](https://github.com/L-codes/Neo-reGeorg)\n- [https://github.com/BeichenDream/Chunk-Proxy](https://github.com/BeichenDream/Chunk-Proxy)\n\n## 其他\n\n扫码加我拉进讨论群，请备注申请理由为：问题反馈与讨论，否则不通过\n\n\u003cimg src=\"https://github.com/user-attachments/assets/362d2079-4cfa-4764-819f-a4aa70580c1d\" width=\"200\" /\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzema1%2Fsuo5","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzema1%2Fsuo5","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzema1%2Fsuo5/lists"}