fix(ohos): isolate platform paths and use rustls-only TLS#577
fix(ohos): isolate platform paths and use rustls-only TLS#577FrankHan052176 wants to merge 3 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughOpenHarmony-specific dependency selection and conditional compilation are added. Configuration, IPC, identity, exports, proxy TLS, WebSocket TLS, and TLS caching now use OpenHarmony-compatible paths and Rustls-only behavior. ChangesOpenHarmony support
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant WsFramedStream
participant Proxy
participant Rustls
WsFramedStream->>Rustls: Select OpenHarmony Rustls connector
WsFramedStream->>Proxy: Attempt TLS/WebSocket connection
Proxy->>Rustls: Connect without NativeTls fallback
Rustls-->>Proxy: Return connection result
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/config.rs`:
- Around line 875-880: Update the cfg condition guarding the `/tmp` fallback
`path` declaration so OpenHarmony (`target_os = "linux", target_env = "ohos"`)
is excluded alongside Android, non-OHOS Linux, and macOS. Preserve the earlier
app-owned path declaration for OHOS and avoid introducing a shadowing fallback
there.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 82c32172-caa3-40bb-9add-8a6166aa4963
📒 Files selected for processing (8)
Cargo.tomlsrc/config.rssrc/fingerprint.rssrc/lib.rssrc/platform/mod.rssrc/proxy.rssrc/tls.rssrc/websocket.rs
Summary
This PR adds OpenHarmony-specific platform handling to
hbb_commonwhile keeping the existing behavior unchanged on Android, iOS, desktop Linux, macOS, and Windows.It contains two scoped commits:
Motivation
Rust OpenHarmony targets such as
aarch64-unknown-linux-ohosreport:target_os = "linux"target_env = "ohos"As a result, code guarded only by
target_os = "linux"incorrectly treats OpenHarmony as a desktop Linux environment.OpenHarmony applications do not provide the same desktop Linux environment, filesystem layout, X11/Wayland stack, machine identity sources, or native TLS implementation. This causes unavailable dependencies and platform helpers to be compiled and makes configuration and IPC paths unsuitable for an application sandbox.
Changes
Platform and configuration isolation
TLS handling
tokio-native-tlsfor OpenHarmony.tokio-tungsteniteandtungstenitefeatures on OpenHarmony.NativeTlson OpenHarmony.NativeTlspath is requested unexpectedly.Compatibility
All behavioral changes are guarded by
target_env = "ohos"or its inverse.This PR does not change:
Validation
git diff --check upstream/main..HEADRelated repository
The OpenHarmony client and integration work are maintained at:
https://github.com/FrankHan052176/rustdesk4ohos
Summary by CodeRabbit
ohos) platform support across configuration paths, IPC/ID generation, fingerprinting, and networking/WebSocket/TLS handling.