mirror of
https://github.com/VallierDev/uu-remote-linux.git
synced 2026-11-16 08:50:40 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8fb57b421d | ||
|
|
72c1e6101f | ||
|
|
a67731052f | ||
|
|
e6089bfb46 | ||
|
|
aa2a341d15 | ||
|
|
9622bf4c1e |
No files matched your search
Generated
+1
-1
@@ -2741,7 +2741,7 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
||||
|
||||
[[package]]
|
||||
name = "uu-remote-linux"
|
||||
version = "0.2.5"
|
||||
version = "0.2.6"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"base64 0.22.1",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "uu-remote-linux"
|
||||
version = "0.2.5"
|
||||
version = "0.2.6"
|
||||
edition = "2021"
|
||||
default-run = "uuremote-server"
|
||||
authors = ["uu-remote-linux contributors"]
|
||||
|
||||
+8
-2
@@ -1,4 +1,4 @@
|
||||
# uu-remote-linux · Unofficial Linux host for NetEase UU Remote
|
||||
# uu-remote-linux · Unofficial Linux host and viewer for NetEase UU Remote
|
||||
|
||||
[简体中文](README.md) | **English**
|
||||
|
||||
@@ -7,13 +7,19 @@
|
||||
> NetEase UU Remote (网易 UU 远程) is a great remote-desktop tool, but there is no Linux version on its
|
||||
> official website. So, with the help of Claude and Codex, I wrote this open-source Linux host: install it,
|
||||
> and you can control your Linux machine from the official Mac / Windows / mobile UU Remote clients.
|
||||
> It now also ships an **experimental Linux viewer**, `uuremote-viewer`, that controls official Windows / Mac hosts or this
|
||||
> project's host from Linux (desktop, file transfer, terminal, port mapping, remote assistance; see
|
||||
> [below](#experimental-native-viewer-uuremote-viewer)).
|
||||
>
|
||||
> This is a personal hobby project. **It is not affiliated with NetEase and is not an official client.**
|
||||
> If NetEase considers this project infringing or inappropriate, please DM me on X
|
||||
> **[@ai_fengshou](https://x.com/ai_fengshou)** and I will take it down right away.
|
||||
|
||||
<p align="center"><img src="docs/images/viewer-window.png" width="720" alt="Linux viewer launcher: device list (device names redacted)"></p>
|
||||
<p align="center"><sub>Linux viewer: device list (device names redacted)</sub></p>
|
||||
|
||||
<p align="center"><img src="docs/images/main-window.png" width="620" alt="Host main window: remote assistance and account"></p>
|
||||
<p align="center"><sub>The QR login window shown on first run (QR code blurred). The UI is in Chinese, like the official app.</sub></p>
|
||||
<p align="center"><sub>Linux host main window: remote assistance and account (device ID, code and account redacted). The UI is in Chinese, like the official app.</sub></p>
|
||||
|
||||
<!-- Screenshot placeholder: the Linux desktop controlled from the official client. Take your own
|
||||
screenshot, remove account/device details and NetEase logos, save it as docs/images/remote-desktop.png
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# uu-remote-linux · UU 远程 Linux 被控端(非官方)
|
||||
# uu-remote-linux · UU 远程 Linux 被控端 + 控制端(非官方)
|
||||
|
||||
**简体中文** | [English](README.en.md)
|
||||
|
||||
@@ -6,12 +6,17 @@
|
||||
>
|
||||
> 网易 UU 远程非常好用,但官网一直没有 Linux 版本。于是我借助 Claude 和 Codex,写了这个开源的 Linux 被控端:
|
||||
> 装上之后,就能用官方的 Mac / Windows / 手机客户端远程控制你的 Linux 电脑。
|
||||
> 现在还附带一个**实验性 Linux 控制端** `uuremote-viewer`:在 Linux 上用 UU 账号远控官方 Windows / Mac 被控端或本项目主机
|
||||
> (桌面、文件传输、终端、端口映射、远程协助,详见[下文](#实验性原生控制端uuremote-viewer))。
|
||||
>
|
||||
> 这是个人兴趣项目,**与网易无关,也不是官方客户端**。如果网易认为本项目侵权或有不妥,
|
||||
> 请在推特私信我 **[@ai_fengshou](https://x.com/ai_fengshou)**,我会第一时间自行下架。
|
||||
|
||||
<p align="center"><img src="docs/images/viewer-window.png" width="720" alt="Linux 控制端启动窗口:设备列表(设备名已打码)"></p>
|
||||
<p align="center"><sub>Linux 控制端:设备列表(设备名已打码)</sub></p>
|
||||
|
||||
<p align="center"><img src="docs/images/main-window.png" width="620" alt="Linux 主机主窗口:远程协助与账号"></p>
|
||||
<p align="center"><sub>首次运行时弹出的扫码登录窗口(二维码已打码)</sub></p>
|
||||
<p align="center"><sub>Linux 被控端主窗口:远程协助与账号(设备 ID、验证码和账号已打码)</sub></p>
|
||||
|
||||
<!-- 截图占位:在官方客户端里远控 Linux 桌面的效果图。请自行截图并去掉账号、设备名等信息后放到
|
||||
docs/images/remote-desktop.png,再取消下面这行的注释。注意不要截入网易的图标和品牌素材。 -->
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 161 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 255 KiB |
@@ -0,0 +1,19 @@
|
||||
控制端可打开官方 Mac 被控端的终端;输入问题诊断日志。/ Viewer terminal works with the official Mac host; input diagnostics.
|
||||
|
||||
### 控制端修复 / Viewer — fixed
|
||||
- **连接官方 Mac 被控端的终端**:之前一连上就断开(「Terminal channel closed」)。Mac 被控端把终端的应答发在终端通道上,
|
||||
控制端现在能识别。已实机验证:可打开终端并正常回显。Mac 被控端的端口映射也已实测可用。
|
||||
Terminal sessions with the official Mac host now open (verified live); port mapping with it was verified too.
|
||||
|
||||
### 主机端诊断 / Host diagnostics(#46)
|
||||
- 收到不认识的输入事件时记一条日志(只有动作名和字段名,**不含输入内容**),用于排查手机输入法打字无反应。
|
||||
- 小键盘按键记录被控端当前的 NumLock 状态(只记开/关,不记按键),用于排查小键盘不出数字。
|
||||
- Logs unsupported input actions (names only, never typed text) and the server's NumLock state for numpad keys.
|
||||
|
||||
### 其他 / Other
|
||||
- README 标题与开头加入控制端介绍并放上截图(#44)。
|
||||
|
||||
### 下载 / Download
|
||||
`uu-remote-linux-v0.2.6-x86_64-linux.tar.gz`:主机 `uuremote-server`(X11 版)与控制端 `uuremote-viewer`(x86_64,glibc ≥ 2.35;控制端需 SDL2、GTK3、ffmpeg),附带 `contrib/`。
|
||||
|
||||
**非官方项目,与网易无关。** / **Unofficial, not affiliated with NetEase.**
|
||||
@@ -248,6 +248,14 @@ impl InputInjector {
|
||||
if AUDIT.fetch_add(1,std::sync::atomic::Ordering::Relaxed) < 8 {
|
||||
log::info!("Desktop keyboard injection outcome: result={result}");
|
||||
}
|
||||
// KP_0..KP_9 type digits only with NumLock on (#46); record the server's NumLock state, not the key.
|
||||
static NUMPAD: std::sync::atomic::AtomicUsize = std::sync::atomic::AtomicUsize::new(0);
|
||||
if (0x60..=0x6f).contains(&key) && is_press && self.backend==crate::desktop_backend::DesktopBackend::X11
|
||||
&& NUMPAD.fetch_add(1,std::sync::atomic::Ordering::Relaxed) < 4 {
|
||||
let (mut x,mut y,mut mask)=(0,0,0u32);
|
||||
let state=unsafe { x11_pointer_state(&mut x,&mut y,&mut mask) };
|
||||
log::info!("Desktop numpad key: result={result} numlock={}", state==0 && mask & 0x10 != 0);
|
||||
}
|
||||
if result == 0 {
|
||||
let mut held=self.held.lock().unwrap();
|
||||
if is_press {held.keys.insert(symbol);} else {held.keys.remove(&symbol);}
|
||||
|
||||
@@ -163,6 +163,8 @@ pub async fn run(session:&mut Session,window:&mut Window,decoder:&mut dyn super:
|
||||
|
||||
#[cfg(test)] mod tests {
|
||||
use super::*;
|
||||
// macOS: SDL video must start on the main thread, which the test harness does not use; CI runs it on Linux.
|
||||
#[cfg_attr(target_os="macos",ignore)]
|
||||
#[tokio::test] async fn clipboard_requests_use_existing_window(){
|
||||
if std::env::var_os("UU_VIEWER_CLIPBOARD_TEST_CHILD").is_none(){
|
||||
let output=std::process::Command::new(std::env::current_exe().unwrap())
|
||||
|
||||
@@ -40,7 +40,9 @@ impl Terminal {
|
||||
let worker=tokio::spawn(async move {
|
||||
let mut decoder=Decoder::default();
|
||||
while let Some((channel,data))=rx.recv().await {
|
||||
if channel==CONTROL {
|
||||
// Terminal RPC answers (check_env) come on CONTROL or, from the official Mac host, on BINARY
|
||||
// next to TERM frames (as this project's host does).
|
||||
if channel==CONTROL || (channel==BINARY && !data.starts_with(b"TERM")) {
|
||||
if let Some(r)=blob(&data,22) {if let (Some(h),Some(body))=(blob(r,1),blob(r,24)) {
|
||||
if let Some(t)=p.lock().unwrap().remove(&(24,uint(h,1))) {let _=t.send(Ok(body.to_vec()));}
|
||||
}}continue
|
||||
@@ -85,7 +87,12 @@ impl Terminal {
|
||||
// "not implemented", not "unavailable"; go on and let OPEN report availability.
|
||||
match tokio::time::timeout(std::time::Duration::from_secs(3),self.request((24,id),CONTROL,wire::envelope(id,21,&r))).await{
|
||||
Err(_)=>Ok(()),
|
||||
Ok(b)=>{let b=b?;if uint(&b,1)!=0 {return Err("Terminal environment unavailable".into())}Ok(())}
|
||||
Ok(b)=>{let b=b?;let code=uint(&b,1);
|
||||
if code!=0 {
|
||||
let message=blob(&b,2).map(|m|String::from_utf8_lossy(m).chars().take(80).collect::<String>()).unwrap_or_default();
|
||||
log::info!("Terminal check_env: code={code} message={message:?}");
|
||||
return Err("Terminal environment unavailable".into())
|
||||
}Ok(())}
|
||||
}
|
||||
}
|
||||
pub async fn list_sessions(&self)->Result<Vec<Value>,String>{
|
||||
|
||||
@@ -1071,6 +1071,16 @@ impl WebRtcSession {
|
||||
});}
|
||||
|
||||
},
|
||||
Ok(crate::control_protocol::ControlMessage::Unsupported(v)) => {
|
||||
// Action name and key names only, never values (an IME text event would carry typed text).
|
||||
static UNSUPPORTED: std::sync::atomic::AtomicUsize = std::sync::atomic::AtomicUsize::new(0);
|
||||
if UNSUPPORTED.fetch_add(1, std::sync::atomic::Ordering::Relaxed) < 16 {
|
||||
let action = v.get("action").and_then(serde_json::Value::as_str)
|
||||
.filter(|a| a.len() <= 40 && a.bytes().all(|b| b.is_ascii_alphanumeric() || b == b'_')).unwrap_or("?");
|
||||
let keys: Vec<&str> = v.as_object().map(|o| o.keys().map(String::as_str).take(12).collect()).unwrap_or_default();
|
||||
log::info!("Unsupported CONTROL input: action={action} keys={keys:?}");
|
||||
}
|
||||
},
|
||||
_ => {}
|
||||
}
|
||||
} else if channel_name.contains("STREAMER") {
|
||||
|
||||
Reference in new issue
Block a user