Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c0e936faf | ||
|
|
2975151e97 | ||
|
|
abb1892af4 | ||
|
|
621da3c8fe | ||
|
|
09ff39cc82 | ||
|
|
379ba44ad9 | ||
|
|
801826f36d | ||
|
|
8557c4ab82 | ||
|
|
1fd1a2a3b6 | ||
|
|
bcdfda43af | ||
|
|
c01ab5621a | ||
|
|
d095ac8cec | ||
|
|
11a1f99169 |
@@ -26,7 +26,7 @@ jobs:
|
||||
build:
|
||||
|
||||
name: Build - ${{ matrix.job.name }}
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -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: |
|
||||
@@ -172,7 +172,7 @@ jobs:
|
||||
needs:
|
||||
- build
|
||||
- build-win
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -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 }}
|
||||
@@ -212,7 +212,7 @@ jobs:
|
||||
|
||||
name: Docker push - ${{ matrix.job.name }}
|
||||
needs: build
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -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
|
||||
@@ -285,7 +285,7 @@ jobs:
|
||||
|
||||
name: Docker manifest s6
|
||||
needs: docker
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
|
||||
@@ -348,7 +348,7 @@ jobs:
|
||||
|
||||
name: Docker push classic - ${{ matrix.job.name }}
|
||||
needs: build
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -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/
|
||||
@@ -418,7 +418,7 @@ jobs:
|
||||
|
||||
name: Docker manifest classic
|
||||
needs: docker
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
@@ -442,24 +442,24 @@ jobs:
|
||||
uses: Noelware/docker-manifest-action@master
|
||||
if: github.event_name != 'workflow_dispatch'
|
||||
with:
|
||||
base-image: ${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.GIT_TAG }}
|
||||
extra-images: ${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.GIT_TAG }}-amd64,${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.GIT_TAG }}-arm64v8,${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.GIT_TAG }}-armv7
|
||||
tags: ${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.GIT_TAG }}
|
||||
inputs: ${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.GIT_TAG }}-amd64,${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.GIT_TAG }}-arm64v8,${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.GIT_TAG }}-armv7
|
||||
push: true
|
||||
|
||||
# manifest for :1 tag (major release)
|
||||
- name: Create and push manifest (:major)
|
||||
uses: Noelware/docker-manifest-action@master
|
||||
with:
|
||||
base-image: ${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.MAJOR_TAG }}
|
||||
extra-images: ${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.MAJOR_TAG }}-amd64,${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.MAJOR_TAG }}-arm64v8,${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.MAJOR_TAG }}-armv7
|
||||
tags: ${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.MAJOR_TAG }}
|
||||
inputs: ${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.MAJOR_TAG }}-amd64,${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.MAJOR_TAG }}-arm64v8,${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.MAJOR_TAG }}-armv7
|
||||
push: true
|
||||
|
||||
# manifest for :latest tag
|
||||
- name: Create and push manifest (:latest)
|
||||
uses: Noelware/docker-manifest-action@master
|
||||
with:
|
||||
base-image: ${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.LATEST_TAG }}
|
||||
extra-images: ${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.LATEST_TAG }}-amd64,${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.LATEST_TAG }}-arm64v8,${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.LATEST_TAG }}-armv7
|
||||
tags: ${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.LATEST_TAG }}
|
||||
inputs: ${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.LATEST_TAG }}-amd64,${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.LATEST_TAG }}-arm64v8,${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.LATEST_TAG }}-armv7
|
||||
push: true
|
||||
|
||||
|
||||
@@ -467,7 +467,7 @@ jobs:
|
||||
|
||||
name: debian package - ${{ matrix.job.name }}
|
||||
needs: build
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -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
|
||||
|
||||
@@ -302,8 +302,8 @@ jobs:
|
||||
uses: Noelware/docker-manifest-action@master
|
||||
if: github.event_name != 'workflow_dispatch'
|
||||
with:
|
||||
base-image: ghcr.io/${{ github.repository }}:${{ env.GIT_TAG }}
|
||||
extra-images: |
|
||||
tags: ghcr.io/${{ github.repository }}:${{ env.GIT_TAG }}
|
||||
inputs: |
|
||||
ghcr.io/${{ github.repository }}:${{ env.GIT_TAG }}-amd64,
|
||||
ghcr.io/${{ github.repository }}:${{ env.GIT_TAG }}-arm64v8,
|
||||
ghcr.io/${{ github.repository }}:${{ env.GIT_TAG }}-armv7,
|
||||
@@ -314,8 +314,8 @@ jobs:
|
||||
- name: Create and push manifest (:major)
|
||||
uses: Noelware/docker-manifest-action@master
|
||||
with:
|
||||
base-image: ghcr.io/${{ github.repository }}:${{ env.MAJOR_TAG }}
|
||||
extra-images: |
|
||||
tags: ghcr.io/${{ github.repository }}:${{ env.MAJOR_TAG }}
|
||||
inputs: |
|
||||
ghcr.io/${{ github.repository }}:${{ env.MAJOR_TAG }}-amd64,
|
||||
ghcr.io/${{ github.repository }}:${{ env.MAJOR_TAG }}-arm64v8,
|
||||
ghcr.io/${{ github.repository }}:${{ env.MAJOR_TAG }}-armv7,
|
||||
@@ -326,8 +326,8 @@ jobs:
|
||||
- name: Create and push manifest (:latest)
|
||||
uses: Noelware/docker-manifest-action@master
|
||||
with:
|
||||
base-image: ghcr.io/${{ github.repository }}:${{ env.LATEST_TAG }}
|
||||
extra-images: |
|
||||
tags: ghcr.io/${{ github.repository }}:${{ env.LATEST_TAG }}
|
||||
inputs: |
|
||||
ghcr.io/${{ github.repository }}:${{ env.LATEST_TAG }}-amd64,
|
||||
ghcr.io/${{ github.repository }}:${{ env.LATEST_TAG }}-arm64v8,
|
||||
ghcr.io/${{ github.repository }}:${{ env.LATEST_TAG }}-armv7,
|
||||
|
||||
@@ -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
@@ -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",
|
||||
|
||||
Vendored
+1
-3
@@ -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
@@ -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
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user