Rustdesk代码分析
如何debug rustdesk?
-
用visual studio启动rustdesk
-
下断点到main.rs如下位置
#[cfg(not(any(target_os = "android", target_os = "ios", feature = "cli")))]
fn main() {
- Enjoy!
Rustdesk是否支持http proxy?
No, Link https://github.com/rustdesk/rustdesk/issues/46
测试 G:\Sandbox\cutep\DefaultBox\drive\G\Users\cutep\AppData\Local\SocksCap64.7z
失败,不知道是否跟不支持udp转发有关
如何打开info logging?
log::info!("rendezvous server: {}", rendezvous_server);
具体可以设置环境变量:set RUST_LOG=trace
get_rendezvous_server失败能否skip这个功能?
Normal logging
G:\rustdesk-deploy\rustdesk>rustdesk.exe
[2021-08-31T15:51:35Z INFO rustdesk::server] server not started (will try to start): 系統找不到指定的檔案。 (os error 2)
[2021-08-31T15:51:35Z INFO rustdesk::ipc] Started ipc server at path: \\.\pipe\RustDesk\query
[2021-08-31T15:51:35Z INFO rustdesk::rendezvous_mediator] start rendezvous mediator of rs-sg.rustdesk.com
[2021-08-31T15:51:35Z INFO rustdesk::rendezvous_mediator] start rendezvous mediator of rs-ny.rustdesk.com
[2021-08-31T15:51:35Z INFO rustdesk::rendezvous_mediator] start rendezvous mediator of rs-cn.rustdesk.com
[2021-08-31T15:51:35Z INFO rustdesk::common] Testing nat ...
INFO:TIS: current platform: Windows
[2021-08-31T15:51:35Z INFO rustdesk::rendezvous_mediator] request_pk received from rs-sg.rustdesk.com
[2021-08-31T15:51:35Z INFO rustdesk::rendezvous_mediator] machine uid: 8f636387-079b-477d-838f-fc1e37e3251c
[2021-08-31T15:51:35Z INFO rustdesk::rendezvous_mediator] request_pk received from rs-cn.rustdesk.com
[2021-08-31T15:51:35Z INFO rustdesk::rendezvous_mediator] machine uid: 8f636387-079b-477d-838f-fc1e37e3251c
[2021-08-31T15:51:36Z INFO rustdesk::common] Tested nat type: SYMMETRIC in 217.451331ms
[2021-08-31T15:51:36Z INFO rustdesk::rendezvous_mediator] request_pk received from rs-ny.rustdesk.com
[2021-08-31T15:51:36Z INFO rustdesk::rendezvous_mediator] machine uid: 8f636387-079b-477d-838f-fc1e37e3251c
[2021-08-31T16:01:45Z INFO rustdesk::server::input_service] fix_key_down_timeout_at_exit
Abnormal logging
0x7FFB86934010] ANOMALY: meaningless REX prefix used
0x7FFB86934010] ANOMALY: meaningless REX prefix used
[0x7FFB84BE7DF0] ANOMALY: meaningless REX prefix used
[0x7FFB8748C300] ANOMALY: meaningless REX prefix used
[2021-08-31T15:05:28Z INFO rustdesk::server] server not started (will try to start): The system cannot find the file specified. (os error 2)
[2021-08-31T15:05:28Z INFO rustdesk::ipc] Started ipc server at path: \\.\pipe\RustDesk\query
[2021-08-31T15:05:28Z INFO rustdesk::rendezvous_mediator] start rendezvous mediator of rs-sg.rustdesk.com
[2021-08-31T15:05:28Z INFO rustdesk::rendezvous_mediator] start rendezvous mediator of rs-cn.rustdesk.com
[2021-08-31T15:05:28Z INFO rustdesk::rendezvous_mediator] start rendezvous mediator of rs-ny.rustdesk.com
[2021-08-31T15:05:28Z INFO rustdesk::common] Testing nat ...
[2021-08-31T15:05:28Z INFO rustdesk::rendezvous_mediator] register_pk of rs-cn due to key not confirmed
[2021-08-31T15:05:28Z INFO rustdesk::rendezvous_mediator] register_pk of rs-ny due to key not confirmed
[2021-08-31T15:05:28Z INFO rustdesk::rendezvous_mediator] register_pk of rs-sg due to key not confirmed
[2021-08-31T15:05:28Z INFO rustdesk::rendezvous_mediator] machine uid: f2f0a5dd-7556-4343-ad3a-e0a51b0e9767
[2021-08-31T15:05:28Z INFO rustdesk::rendezvous_mediator] machine uid: f2f0a5dd-7556-4343-ad3a-e0a51b0e9767
[2021-08-31T15:05:28Z INFO rustdesk::rendezvous_mediator] machine uid: f2f0a5dd-7556-4343-ad3a-e0a51b0e9767
INFO:TIS: current platform: Windows
[2021-08-31T15:05:29Z INFO rustdesk::rendezvous_mediator] register_pk of rs-cn due to key not confirmed
[2021-08-31T15:05:29Z INFO rustdesk::rendezvous_mediator] register_pk of rs-ny due to key not confirmed
[2021-08-31T15:05:29Z INFO rustdesk::rendezvous_mediator] register_pk of rs-sg due to key not confirmed
[2021-08-31T15:05:29Z INFO rustdesk::rendezvous_mediator] machine uid: f2f0a5dd-7556-4343-ad3a-e0a51b0e9767
[2021-08-31T15:05:29Z INFO rustdesk::rendezvous_mediator] machine uid: f2f0a5dd-7556-4343-ad3a-e0a51b0e9767
[2021-08-31T15:05:29Z INFO rustdesk::rendezvous_mediator] machine uid: f2f0a5dd-7556-4343-ad3a-e0a51b0e9767
[2021-08-31T15:05:30Z ERROR rustdesk::common] test nat: No connection could be made because the target machine actively refused it. (os error 10061)
[2021-08-31T15:05:31Z INFO rustdesk::rendezvous_mediator] register_pk of rs-ny due to key not confirmed
feature = “inline”是啥意思?
env_logger如何打开logging?
Flow分析
软件启动流程
#[cfg(not(any(target_os = "android", target_os = "ios", feature = "cli")))]
fn main() {
digraph X{
main -> "2.ui::start(&mut args[..]);"
-> "sciter::WindowBuilder::main_window().create();"
-> "?"
main -> "1.std::thread::spawn(move || start_server(false, false));"
-> "RendezvousMediator::start_all()"
-> "RendezvousMediator::start()"
-> "..."
-> "new_remote() when click connect"
}
- 上一篇 如何禁止鼠标唤醒win10?
- 下一篇 压缩视频