refactor(ohos): 拆分 OHRS 包并按 socket 精细保护 VPN 流量 (#2543)

* refactor(ohos): split facade feature and kernel crates
* feat(ohos): protect transport sockets individually
* fix(ohos): keep local proxy subnets off tun
* fix(ohos): expose valid config enum values
* refactor(ohos): finalize reusable core boundary
* test(ohos): verify split package contracts

* fix(port-forward): support wildcard userspace listeners
Keep the existing Host listener intact while adding a DataPlane listener for force-smoltcp IPv4 wildcard rules. Keep literal loopback destinations on the local Host path instead of exporting them through an exit node.

* chore(ohos): refresh split workspace lockfile
* fix(socket): normalize Windows raw socket handles
* refactor(socket): carry VPN protection through host bind options
* refactor(socket): simplify protection defaults and TUN ingress
* refactor(socket): consolidate native protection and socket creation
* fix(socket): protect outbound UDP paths
* fix(socket): preserve VPN routing for RPC listeners

---------

Co-authored-by: FrankHan <frankhan@FrankHans-Mac-mini.local>
Co-authored-by: KKRainbow <443152178@qq.com>
This commit is contained in:
authored and GitHub committed 2026-09-09 22:12:47 +08:00
1 parent b1f87f025b
commit 38e2a621bb
63 files changed
+2011 -397

No files matched your search

+35 -6
View File
@@ -1271,27 +1271,56 @@ dependencies = [
"zstd",
]
[[package]]
name = "easytier-ohos-core"
version = "0.1.0"
dependencies = [
"async-trait",
"easytier",
"easytier-core",
"ipnet",
"once_cell",
"serde",
"serde_json",
"tokio",
"url",
]
[[package]]
name = "easytier-ohos-features"
version = "0.1.0"
dependencies = [
"base64 0.22.1",
"easytier",
"flate2",
"gethostname 1.1.0",
"once_cell",
"prost-reflect",
"rusqlite",
"serde",
"serde_json",
"tracing",
"url",
"uuid",
]
[[package]]
name = "easytier-ohrs"
version = "0.1.0"
dependencies = [
"anyhow",
"async-trait",
"base64 0.22.1",
"bytes",
"easytier",
"easytier-core",
"easytier-ohos-core",
"easytier-ohos-features",
"easytier-proto",
"flate2",
"futures",
"gethostname 1.1.0",
"ipnet",
"napi-build-ohos",
"napi-derive-ohos",
"napi-ohos",
"once_cell",
"prost-reflect",
"rusqlite",
"serde",
"serde_json",
"tokio",