Files
Easytier/easytier-proto/proto/api_config.proto
T
KKRainbow 021f523431 refactor(core): separate portable core from native runtime (#2451)
Create easytier-core as the portable owner of configuration,
connectivity, tunnels, peer and routing state, gateways, management,
the data plane, and instance lifecycle. Keep operating-system
integration, native protocol engines, process startup, and presentation
in easytier behind explicit Host capability adapters.

Create easytier-proto to own schemas, generated RPC types, descriptors,
and feature-scoped protocol slices. Remove runtime protobuf reflection
from core while preserving unknown route-peer fields across forwarding.

Normalize instance construction through CoreInstance, CoreHostAdapters,
CoreProcessRuntime, and InstanceManager. Make the runtime config store
the only authoritative mutable configuration after startup.

Move the portable TCP/UDP data plane into core and extract a generic
OperationBroker for completion, cancellation, disposal, and capacity
accounting. Expose the session-based FFI v2 completion API and keep the
WASI guest ABI, wire schemas, and adapters with core.

Migrate CLI, GUI, web, FFI, Android JNI, OHOS, uptime, and mobile
consumers to the shared manager and core state. Add explicit user/web
config ownership and revision-aware web reconciliation.

Preserve configuration, wire, and management behavior while fixing
regressions discovered by the full platform and integration matrix:

- inherit advertised relay capabilities in foreign networks;
- refresh OSPF peer state immediately after runtime config changes;
- restore CLI GlobalCtx event output without forcing GUI logging;
- retain legacy encryption names and standalone RPC tunnel metadata;
- restore ICMP host composition and fragmented UDP handling;
- use portable 64-bit atomics on 32-bit MIPS targets; and
- retain discarded operations until late cancellation completes.

Validate the refactor across 45 GitHub checks, including Linux, macOS,
Windows, FreeBSD, web, GUI, Android, OHOS, feature profiles, and
three-node and subnet-proxy integration tests.

BREAKING CHANGE: internal Rust module paths are not preserved. Legacy
native data-plane APIs are replaced by the session-based FFI v2 API.
The dedicated Android data-plane wrapper is removed.
2026-07-26 15:41:55 +08:00

89 lines
1.9 KiB
Protocol Buffer

syntax = "proto3";
import "common.proto";
import "acl.proto";
import "api_instance.proto";
import "api_manage.proto";
package api.config;
enum ConfigPatchAction {
ADD = 0;
REMOVE = 1;
CLEAR = 2;
}
message InstanceConfigPatch {
optional string hostname = 1;
optional common.Ipv4Inet ipv4 = 2;
optional common.Ipv6Inet ipv6 = 3;
repeated PortForwardPatch port_forwards = 4;
optional AclPatch acl = 5;
repeated ProxyNetworkPatch proxy_networks = 6;
repeated RoutePatch routes = 7;
repeated ExitNodePatch exit_nodes = 8;
repeated UrlPatch mapped_listeners = 9;
repeated UrlPatch connectors = 10;
optional bool ipv6_public_addr_provider = 11;
optional bool ipv6_public_addr_auto = 12;
optional string ipv6_public_addr_prefix = 13;
optional bool disable_relay_data = 14;
}
message PortForwardPatch {
ConfigPatchAction action = 1;
common.PortForwardConfigPb cfg = 2;
}
message StringPatch {
ConfigPatchAction action = 1;
string value = 2;
}
message UrlPatch {
ConfigPatchAction action = 1;
common.Url url = 2;
}
message AclPatch {
optional acl.Acl acl = 1;
repeated StringPatch tcp_whitelist = 2;
repeated StringPatch udp_whitelist = 3;
}
message ProxyNetworkPatch {
ConfigPatchAction action = 1;
common.Ipv4Inet cidr = 2;
optional common.Ipv4Inet mapped_cidr = 3;
}
message RoutePatch {
ConfigPatchAction action = 1;
common.Ipv4Inet cidr = 2;
}
message ExitNodePatch {
ConfigPatchAction action = 1;
common.IpAddr node = 2;
}
message PatchConfigRequest {
InstanceConfigPatch patch = 1;
api.instance.InstanceIdentifier instance = 2;
}
message PatchConfigResponse {}
message GetConfigRequest {
api.instance.InstanceIdentifier instance = 1;
}
message GetConfigResponse {
api.manage.NetworkConfig config = 1;
}
service ConfigRpc {
rpc PatchConfig(PatchConfigRequest) returns (PatchConfigResponse);
rpc GetConfig(GetConfigRequest) returns (GetConfigResponse);
}