检测到飞连软件未正常运行,禁止设备连接办公网络
问题描述
上周下载编译运行corplink-rs能够正常使用。一周后,办公电脑连接办公网络1~2分钟后(个人网络也是),连接被断开。
export RUST_BACKTRACE=full没有观察到异常trace:
export RUST_BACKTRACE=full; ./corplink-rs-debug config.json
[2024-06-24T03:50:31Z INFO corplink_rs] running [email protected]
[2024-06-24T03:50:31Z INFO corplink_rs] running [email protected]
[2024-06-24T03:50:31Z INFO corplink_rs::client] cookie file is: utun9_cookies.json
[2024-06-24T03:50:31Z INFO corplink_rs] try to connect
[2024-06-24T03:50:33Z INFO corplink_rs::client] found set-cookie in header, saving cookie
[2024-06-24T03:50:33Z INFO corplink_rs::client] found 3 vpn(s), details: ["xxx", "xxx", "xxx"]
[2024-06-24T03:50:36Z INFO corplink_rs::client] try connect to xxx, address xxx:443
[2024-06-24T03:50:36Z INFO corplink_rs::client] try to get wg conf from remote
[2024-06-24T03:50:36Z INFO corplink_rs::client] 2fa code generated: 095822, 24 seconds left
[2024-06-24T03:50:37Z INFO corplink_rs] start wg-corplink for utun9
[2024-06-24T03:50:37Z INFO corplink_rs::wg] start wg-corplink
[2024-06-24T03:50:37Z INFO corplink_rs::wg] send config to uapi
[2024-06-24T03:50:37Z INFO corplink_rs::client] keep alive
[2024-06-24T03:51:38Z INFO corplink_rs::client] keep alive
[2024-06-24T03:51:38Z WARN corplink_rs::client] keep alive error: error sending request for url (https://xxx:8002/vpn/report?os=Android&os_version=2): connection closed before message completed
[2024-06-24T03:51:38Z INFO corplink_rs] disconnecting vpn...
[2024-06-24T03:51:44Z INFO corplink_rs] reach exit
lark通知:
飞连软件未正常运行通知 设备序列号:xxx 检测到您登陆过的设备超过5天未开启飞连软件,出于网络安全方面考虑,对于长时间未登陆设备将停止办公网络接入。
禁止设备连接办公网络通知 设备序列号:xxx 检测到您登陆过的设备超过7天未开启飞连软件,出于网络安全方面考虑,对于长时间未登陆设备将停止办公网络接入。
飞连通知:
网络降级一限制接入员工Wi-Fi。请连接打开飞连并连接任任意网络等待2分钟左右直到飞书收到网络恢复通知。
安装飞连后:
办公网络权限恢复通知 设备序列号:xxx 您的设备已恢复正常,可重新连接办公网络
环境信息
corplink-rs 版本:0.4.3
macOS 14.4.1 sonoma
chip Apple M2 Pro
uname -v
Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:49 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6020
飞连版本:2.2.23
从你提供的信息来看,新版的飞连可能增加了类似心跳的功能,需要分析具体的心跳包,然后新增对应的逻辑。我司使用的飞连版本目前还没有增加这个限制,所以你可能需要自己研究一下这个心跳机制然后尝试实现了
运行croplink-rs后,WireShark抓包utun10能看到与server(config.json中的server)的握手和断开请求:
而安装运行飞连后,Wireshark抓包en0显示有几秒一次的规律请求,内容加密:
通过mitmproxy代理尝试抓包(在mac Wi-Fi连接中设置代理、安装证书),但没能抓到上图所示的规律请求,不知如何分析请求。目前workaround是每周安装/删除一次飞连