PinkD / corplink-rs

使用 rust 实现的飞连客户端
GNU General Public License v2.0
194 stars 26 forks source link

检测到飞连软件未正常运行,禁止设备连接办公网络 #39

Open LionheartLann opened 1 week ago

LionheartLann commented 1 week ago

问题描述

上周下载编译运行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 corplink-rs@0.4.3
[2024-06-24T03:50:31Z INFO  corplink_rs] running corplink-rs@0.4.3
[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
PinkD commented 1 week ago

从你提供的信息来看,新版的飞连可能增加了类似心跳的功能,需要分析具体的心跳包,然后新增对应的逻辑。我司使用的飞连版本目前还没有增加这个限制,所以你可能需要自己研究一下这个心跳机制然后尝试实现了