12 Commits
Author SHA1 Message Date
lejianwen 2975151e97 style: Docker workdir set /app 2025-02-07 18:34:58 +08:00
乐 abb1892af4 Merge branch 'rustdesk:master' into forapi 2025-02-06 21:50:12 +08:00
乐 621da3c8fe fix: 127.0.0.1 is not loopback (#515) 2025-02-06 20:25:10 +08:00
乐 09ff39cc82 fix: 127.0.0.1 is not loopback (#5) 2025-02-06 20:03:29 +08:00
lejianwen 379ba44ad9 Merge branch 'master' into forapi
# Conflicts:
#	debian/changelog
2025-02-03 13:50:57 +08:00
RustDesk 801826f36d Update build.yaml 2025-01-31 15:11:28 +08:00
rustdesk 8557c4ab82 freebsd still not work 2025-01-25 20:47:19 +08:00
rustdesk 1fd1a2a3b6 1.1.14 2025-01-25 20:37:16 +08:00
21pages bcdfda43af update dep (#507)
Signed-off-by: 21pages <sunboeasy@gmail.com>
2025-01-22 20:27:25 +08:00
乐 c01ab5621a Merge branch 'rustdesk:master' into forapi 2025-01-22 19:55:03 +08:00
lejianwen d095ac8cec style: optimize online query 2025-01-22 19:44:16 +08:00
XLion 11a1f99169 Fix test error (#505) 2025-01-21 23:53:23 +08:00
6 changed files with 44 additions and 46 deletions
+6 -6
View File
@@ -65,7 +65,7 @@ jobs:
run: chmod -v a+x target/${{ matrix.job.target }}/release/*
- name: Publish Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: binaries-linux-${{ matrix.job.name }}
path: |
@@ -155,7 +155,7 @@ jobs:
recursive: false
- name: Publish Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: binaries-windows-x86_64
path: |
@@ -187,7 +187,7 @@ jobs:
steps:
- name: Download binaries (${{ matrix.job.os }} - ${{ matrix.job.name }})
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: binaries-${{ matrix.job.os }}-${{ matrix.job.name }}
path: ${{ matrix.job.name }}
@@ -230,7 +230,7 @@ jobs:
submodules: recursive
- name: Download binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: binaries-linux-${{ matrix.job.name }}
path: docker/rootfs/usr/bin
@@ -365,7 +365,7 @@ jobs:
submodules: recursive
- name: Download binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: binaries-linux-${{ matrix.job.name }}
path: docker-classic/
@@ -494,7 +494,7 @@ jobs:
mkdir -p debian-build/${{ matrix.job.name }}/bin
- name: Download binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: binaries-linux-${{ matrix.job.name }}
path: debian-build/${{ matrix.job.name }}/bin
+12 -8
View File
@@ -14,13 +14,14 @@ jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
submodules: recursive
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1
with:
@@ -29,13 +30,14 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
submodules: recursive
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1
with:
@@ -45,14 +47,15 @@ jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
submodules: recursive
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1
with:
@@ -65,14 +68,15 @@ jobs:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy
submodules: recursive
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1
with:
Generated
+3 -2
View File
@@ -342,6 +342,7 @@ dependencies = [
"iana-time-zone",
"js-sys",
"num-traits",
"serde",
"wasm-bindgen",
"windows-targets 0.52.6",
]
@@ -558,7 +559,7 @@ dependencies = [
[[package]]
name = "default_net"
version = "0.1.0"
source = "git+https://github.com/rustdesk-org/default_net#c400b0bbf49a987129796221fbc41a8a385b812e"
source = "git+https://github.com/rustdesk-org/default_net#78f8f70cd85151a3a2c4a3230d80d5272703c02e"
dependencies = [
"anyhow",
"regex",
@@ -1068,7 +1069,7 @@ dependencies = [
[[package]]
name = "hbbs"
version = "1.1.13"
version = "1.1.14"
dependencies = [
"async-speed-limit",
"async-trait",
+1 -3
View File
@@ -1,7 +1,5 @@
rustdesk-server (1.1.14) UNRELEASED; urgency=medium
* add KeyExchange
* fix ws query online
* add Must Login
* Fix windows crash
rustdesk-server (1.1.13) UNRELEASED; urgency=medium
* Version check and refactor hbb_common to share with rustdesk client
+2 -1
View File
@@ -19,7 +19,8 @@ EXPOSE 21114 21115 21116 21116/udp 21117 21118 21119
HEALTHCHECK --interval=10s --timeout=5s CMD /usr/bin/healthcheck.sh
WORKDIR /data
WORKDIR /app
VOLUME /app/data
VOLUME /data
+20 -26
View File
@@ -624,19 +624,7 @@ impl RendezvousServer {
}
}
Some(rendezvous_message::Union::OnlineRequest(or)) => {
let mut states = BytesMut::zeroed((or.peers.len() + 7) / 8);
for (i, peer_id) in or.peers.iter().enumerate() {
if let Some(peer) = self.pm.get_in_memory(peer_id).await {
let elapsed = peer.read().await.last_reg_time.elapsed().as_millis() as i32;
// bytes index from left to right
let states_idx = i / 8;
let bit_idx = 7 - i % 8;
if elapsed < REG_TIMEOUT {
states[states_idx] |= 0x01 << bit_idx;
}
}
}
let mut states = self.peers_online_state(or.peers).await;
let mut msg_out = RendezvousMessage::new();
msg_out.set_online_response(OnlineResponse {
states: states.into(),
@@ -650,6 +638,22 @@ impl RendezvousServer {
false
}
async fn peers_online_state(&mut self, peers: Vec<String>) -> BytesMut {
let mut states = BytesMut::zeroed((peers.len() + 7) / 8);
for (i, peer_id) in peers.iter().enumerate() {
if let Some(peer) = self.pm.get_in_memory(peer_id).await {
let elapsed = peer.read().await.last_reg_time.elapsed().as_millis() as i32;
// bytes index from left to right
let states_idx = i / 8;
let bit_idx = 7 - i % 8;
if elapsed < REG_TIMEOUT {
states[states_idx] |= 0x01 << bit_idx;
}
}
}
states
}
#[inline]
async fn update_addr(
&mut self,
@@ -882,18 +886,7 @@ impl RendezvousServer {
stream: &mut FramedStream,
peers: Vec<String>,
) -> ResultType<()> {
let mut states = BytesMut::zeroed((peers.len() + 7) / 8);
for (i, peer_id) in peers.iter().enumerate() {
if let Some(peer) = self.pm.get_in_memory(peer_id).await {
let elapsed = peer.read().await.last_reg_time.elapsed().as_millis() as i32;
// bytes index from left to right
let states_idx = i / 8;
let bit_idx = 7 - i % 8;
if elapsed < REG_TIMEOUT {
states[states_idx] |= 0x01 << bit_idx;
}
}
}
let mut states = self.peers_online_state(peers).await;
let mut msg_out = RendezvousMessage::new();
msg_out.set_online_response(OnlineResponse {
@@ -1188,7 +1181,8 @@ impl RendezvousServer {
async fn handle_listener2(&self, stream: TcpStream, addr: SocketAddr) {
let mut rs = self.clone();
if addr.ip().is_loopback() {
let ip = try_into_v4(addr).ip();
if ip.is_loopback() {
tokio::spawn(async move {
let mut stream = stream;
let mut buffer = [0; 1024];