Luc Busquin
91fb928c6e
Fix i32 overflow: peers offline 24.9-49.7 days wrongly reported online ( #676 )
...
`Duration::as_millis()` returns u128; casting it `as i32` in the
online-status and punch-hole checks keeps only the low 32 bits as a
signed integer. Once a peer has not registered for more than 2^31 ms
(~24.855 days), the value wraps negative and passes the
`elapsed < REG_TIMEOUT` test, so a long-offline peer is reported online
and connection attempts are relayed to its stale socket_addr. The
in-memory peer map is never evicted, so last_reg_time stays frozen until
hbbs restarts, making the false-online window 24.86-49.71 days (and it
repeats every ~49.71 days).
Widen REG_TIMEOUT and the two elapsed casts from i32 to i64 so the
comparison no longer overflows.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-07-07 10:14:03 +08:00
rustdesk
80d3a50566
https://github.com/rustdesk/rustdesk-server/issues/670
2026-07-01 12:17:57 +08:00
rustdesk
46e9ecd47d
fix pr
2026-01-12 17:28:25 +08:00
rustdesk
5d1b4ba78a
connection log query
2026-01-06 23:59:47 +08:00
rustdesk
4e8d6d08e2
fix https://github.com/rustdesk/rustdesk-server/issues/435
2025-11-03 13:03:19 +08:00
乐
621da3c8fe
fix: 127.0.0.1 is not loopback ( #515 )
2025-02-06 20:25:10 +08:00
21pages
7a509f6975
replace libs/hbb_common with submodule ( #502 )
...
cargo update -p schannel to fix crash on higher rust toolchain, https://github.com/seanmonstar/reqwest/issues/2311
Signed-off-by: 21pages <sunboeasy@gmail.com >
2025-01-20 17:34:22 +08:00
Integral
772db7422f
refactor: replace static with const for global constants ( #494 )
2024-12-07 17:54:53 +08:00
rustdesk
6f18a97644
v1.1.12
2024-10-07 16:21:36 +08:00
rustdesk
e40994d62e
remove useless KEY_FOR_API
2024-05-26 21:43:13 +08:00
rustdesk
5078a1f797
reuse port, and revert hbbr -k
2024-05-24 18:37:11 +08:00
Paolo Asperti
94ae51458c
fix Pk size check ( #361 )
...
* more descriptive error
* fix key size check
2024-01-31 11:21:00 +08:00
paspo
cea8403dbc
private key size check
2024-01-30 11:18:43 +01:00
rustdesk
1142cf105b
Fix #324 to remove unsafe
2023-12-01 11:32:07 +08:00
rustdesk
f1e941bf9f
fix is_loopback
2023-06-16 15:13:23 +08:00
rustdesk
411502cd0b
https://github.com/rustdesk/rustdesk-server/issues/260
2023-06-08 20:02:30 +08:00
rustdesk
fd1c21b114
fmt
2023-06-08 14:11:37 +08:00
RustDesk
d8e3cb9e65
Merge pull request #249 from nsgundy/FixNoDirectConnectionWhenBothPeersOnLan
...
Fix no direct connection when both peers on LAN
2023-06-08 13:53:09 +08:00
rustdesk
3a7904fa8e
fix test_hbb and bump version 1.1.8
2023-06-08 13:42:34 +08:00
nsgundy
85a20769fb
Consider peers to be on same intranet if is_lan() returns true for both
2023-05-19 15:21:59 +00:00
nsgundy
aeeca0d7d1
Fix ip4 mapped ip6 addresses not considered to be part of network
2023-05-19 15:21:20 +00:00
rustdesk
675bf3c1f5
fix command line buffer and test addr
2023-03-16 00:53:58 +08:00
rustdesk
ec202209f3
fix ID_EXISTS not sent out due to ipv6 change
2023-02-18 13:41:45 +08:00
rustdesk
7e307a5a1c
CI
2023-02-08 16:00:12 +08:00
rustdesk
fc83fa0a04
try_into_v4
2023-01-10 16:09:25 +08:00
rustdesk
55b841afb5
one more clippy
2023-01-07 00:37:12 +08:00
RustDesk
0e01cfcd3a
Merge branch 'master' into fix-clippy-warning
2023-01-07 00:28:18 +08:00
rustdesk
e70d82b30f
ipv6 support draft
2023-01-06 20:31:15 +08:00
Bo Zhang
60a6d672c5
Fix: clippy warning in rust 1.66.0
2023-01-06 18:48:18 +09:00
RustDesk
75a40412b4
Merge branch 'master' into listern-for-unix-signal
2023-01-06 11:09:52 +08:00
Huabing Zhou
2314783d42
sync rustdesk's hbb_common here
2023-01-06 10:40:26 +08:00
fufesou
099aaa6b55
query_onlines: trivial refactor
...
Signed-off-by: fufesou <shuanglongchen@yeah.net >
2022-10-04 13:09:56 +08:00
dlhxzb
ca2bc99a38
Feat: listen for unix signal
2022-08-04 18:02:10 +09:00
fufesou
f7fc45a3d2
peer_online_state: response online state bits
...
Signed-off-by: fufesou <shuanglongchen@yeah.net >
2022-07-27 00:35:40 +08:00
fufesou
a4940f4634
peer_online_state: serve online state
...
Signed-off-by: fufesou <shuanglongchen@yeah.net >
2022-07-26 23:03:30 +08:00
rustdesk
51d8cd80c1
protbuf 3.1 with_bytes
2022-07-22 00:28:10 +08:00
rustdesk
acaee5b7a4
https://github.com/rustdesk/rustdesk-server/issues/24
2022-07-14 18:39:42 +08:00
rustdesk
39153ce147
fix slow connection, '/' in pub key, and hbbr wait for key, and possible
...
solution for https://github.com/rustdesk/rustdesk-server/issues/24
2022-07-13 00:22:45 +08:00
rustdesk
cb26ce5bbc
remove confusions
2022-05-13 09:56:44 +08:00
rustdesk
df2e4bb411
remove lic check
2022-05-12 20:22:19 +08:00
rustdesk
b3f39598a7
change sled to sqlite and remove lic
2022-05-12 20:00:33 +08:00
open-trade
411e963187
some guys use empty id
2021-05-11 20:28:43 +08:00
open-trade
af4469711c
bug fix
2021-05-11 19:30:43 +08:00
open-trade
452b993ad6
make local connection secured
2021-05-11 19:05:27 +08:00
open-trade
34a55668f3
bug fix
2021-04-08 14:52:30 +08:00
open-trade
c7bac6b859
fix
2021-04-08 12:23:37 +08:00
opentrade
92bd9c3250
change-id option
2021-04-08 00:33:30 +08:00
opentrade
710f0b2681
INVALID_ID_FORMAT
2021-04-06 17:08:37 +08:00
opentrade
5e0f429e84
remove uuid back compatibility
2021-04-06 16:18:09 +08:00
rustdesk
a10bb34f6e
rename
2021-04-03 22:32:14 +08:00