Files
EasyTier/easytier-proto/proto/web.proto
T
KKRainbowandCodex 99db92a3ae fix(config): preserve and patch empty manual route mode (#2709)
* fix(config): preserve empty manual route mode in API conversion

Treat present TOML routes as manual mode even when the list is empty.
Both Core readback and Web normalization must distinguish routes=[]
from automatic discovery; otherwise Web can skip a required overwrite
and Core can report a different mode from its running configuration.

Cover API/TOML round trips and receiver reconcile mode transitions.
Verify default-feature tests, clippy, formatting and real system routes
in three isolated Linux network namespaces.

* fix(config): patch manual route mode and verify legacy readback

Add an explicit manual-route mode to route patches and advertise typed
readback support through GetConfig. Apply the mode and route edits in the
existing route transaction without restarting the instance; keep released
callers that omit the new field on their existing route semantics.

Web gates route patches on the observed capability. For old clients with
ambiguous empty routes, recover the actual mode from GetConfig TOML or
instance-scoped ShowNodeInfo before acknowledging application. Supporting
clients use typed readback directly. Keep capability evidence in the
existing session cache and preserve its invalidation rules.

Cover mode transitions, persistence failure, stable peer identity, legacy
readback, compact clients, failed observations and cache capability gates.
Document the runtime contract and compatibility boundary.

* refactor(web): advertise route patch support in heartbeats

Declare manual-route patch and typed readback support on the WebClient
heartbeat alongside existing client capabilities. Select route updates
and legacy readback from the current authenticated Session heartbeat,
including when reconciliation reuses an observed configuration.

Remove the unreleased GetConfig capability field and per-instance
capability wrapper. Keep only observed configuration in the existing
cache, and retain strict application confirmation after full Run.

Cover the client declaration, legacy default and capability changes
against the same cached configuration. Update the runtime contract.

---------

Co-authored-by: Codex <codex@users.noreply.github.com>
2026-10-16 00:47:43 +08:00

47 lines
1.1 KiB
Protocol Buffer

syntax = "proto3";
import "common.proto";
package web;
message DeviceOsInfo {
string os_type = 1;
string version = 2;
string distribution = 3;
}
message HeartbeatRequest {
common.UUID machine_id = 1;
common.UUID inst_id = 2;
string user_token = 3;
string easytier_version = 4;
string report_time = 5;
string hostname = 6;
repeated common.UUID running_network_instances = 7;
DeviceOsInfo device_os = 8;
bool support_config_source = 9;
repeated common.UUID failed_network_instances = 10;
bool support_heartbeat_policy = 11;
// Supports explicit manual mode patches and typed empty-manual readback.
// Older peers silently ignore unknown patch fields; missing means false.
bool support_manual_routes_patch = 12;
}
message HeartbeatResponse {
optional uint32 heartbeat_interval_ms = 1;
optional uint32 heartbeat_timeout_ms = 2;
}
message GetFeatureRequest {}
message GetFeatureResponse {
bool support_encryption = 1;
}
service WebServerService {
rpc Heartbeat(HeartbeatRequest) returns (HeartbeatResponse);
rpc GetFeature(GetFeatureRequest) returns (GetFeatureResponse);
}