HardConnecter / HardConnect

HardConnect for fduer
GNU Affero General Public License v3.0
1 stars 0 forks source link

Windows 下,HardConnect 上行链路速度极为缓慢(~30 KB/s) #1

Open w568w opened 1 week ago

w568w commented 1 week ago

软件版本 v0.0.1

使用环境 Windows 11 x64 23H2 内部版本 22631.4249 (已在多台 Windows 11 设备和网络环境中复现

服务端地址 stuvpn.fudan.edu.cn:443

故障描述 (建议结合图片说明) 在访问校内服务器时,上行速度(从本地传输文件到校内服务器)极为缓慢,速度仅有 30KB/s;而官方 EasyConnect Windows 客户端和 docker-easyconnect 代理的速度正常。

重现方法

  1. 下载客户端;
  2. 安装 WinSCP;
  3. 运行 .\HardConnect.exe -username <学号> -password <密码>,程序正常启动并可连接;
  4. 启动 WinSCP,用 SCP 或 SFTP 协议,通过 SOCKS5 代理连接任意校内服务器;
  5. 尝试下载大文件,速度正常,约 5~6 MB/s;
  6. 尝试上传大文件,速度异常,仅 30~40 KB/s。

预期行为 上行速度正常。

日志

2024/10/07 00:14:12 Start HardConnect v0.0.1
2024/10/07 00:14:12 Exec func on initial: check bind port
2024/10/07 00:14:12 Exec func on initial  check bind port success
2024/10/07 00:14:12 Request: https://stuvpn.fudan.edu.cn:443/por/login_auth.csp?apiversion=1
2024/10/07 00:14:12 TWFID: 34a07bbeaf4a66af
2024/10/07 00:14:12 RSA key: 97BE26964939EB2501CBBCF046445E68F1F2930FDFAD29C8013251842381843388610D5AB145FC8503EB5ED116B3CDBF2729A2B9B81E721A936810EA0A2966DC2DFB87D9324E66E97B389E750951A38244548C2A80CF23F2D039782E3B094F413456176C204D02630ABF347B71B48028197A929595F88868E9CBE2C199E3CC49C4F148C5712DF9EA21D065A7E65CDC460B5E622DC1681FAFC985C3C0EFF55A97197A7E3E71CDB41C5A0AA53551736BF71B420E55B7476498B7888ACC359202704AC51A043A13CE080C64A2D8F0E3C384518CF2E77CA96F651BC00EF582B57A52E45CCA7CAB314D71E61BA511C0E30CDECF3D2F1514AF31D3CB4B7A97683EAA05
2024/10/07 00:14:12 RSA exp: 65537
2024/10/07 00:14:12 CSRF Code: 1776770759
2024/10/07 00:14:12 Request: https://stuvpn.fudan.edu.cn:443/por/login_psw.csp?anti_replay=1&encrypt=1&apiversion=1
2024/10/07 00:14:12 No NextAuth found
2024/10/07 00:14:12 Update TWFID: 74a07bbeaf4a66af
2024/10/07 00:14:12 TWFID has been authorized
2024/10/07 00:14:12 Request: https://stuvpn.fudan.edu.cn:443/por/conf.csp
2024/10/07 00:14:12 Parsing line list from config
2024/10/07 00:14:12 Error occurred while parsing config: empty line list
2024/10/07 00:14:12 ECAgent request: /por/conf.csp & /por/rclist.csp
2024/10/07 00:14:12 Server session ID: c5c82178779f33a46c725262df5fc7c7361b98f67803e25442b67f9f38d5c9dd
2024/10/07 00:14:12 Token: 633563383231373837373966333361343663373235323632646635666337630037346130376262656166346136366166
2024/10/07 00:14:12 Request: https://stuvpn.fudan.edu.cn:443/por/rclist.csp
2024/10/07 00:14:12 Parsing resources...
2024/10/07 00:14:13 Socket: connected to: 202.120.224.58:443
2024/10/07 00:14:13 TLS: connected to: 202.120.224.58:443
2024/10/07 00:14:13 Client IP: 10.230.32.39
2024/10/07 00:14:13 EasyConnect client started
2024/10/07 00:14:13 Add custom DNS: zb.fudan.edu.cn -> 10.108.68.200
2024/10/07 00:14:13 HTTP server listening on :1081
2024/10/07 00:14:13 SOCKS5 server listening on :1080
2024/10/07 00:14:13 Socket: connected to: 202.120.224.58:443
2024/10/07 00:14:13 TLS: connected to: 202.120.224.58:443
2024/10/07 00:14:13 Socket: connected to: 202.120.224.58:443
2024/10/07 00:14:13 TLS: connected to: 202.120.224.58:443
2024/10/07 00:14:16 <服务器 IP>:22 -> VPN
2024/10/07 00:14:18 KeepAlive: OK
w568w commented 5 days ago

已查明部分问题,Windows 下用于代理 SSH 流量到 SOCKS5 的 connect(来自 MinGW)和 ncat 都存在性能问题,代理时上行速度极低。换用 socat-windows 后速度提升到 1MB/s。

然而,这依然远低于 EasyConnect 的速度(\~5MB/s)或直连速度(\~6MB/s)。