mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-09-01 00:39:24 +00:00
4a10d1c2b9
* feat(mobile): add embedded iOS runtime API Add a thin panic-safe C ABI crate for embedding no-TUN instances on iOS. Expose lifecycle, status, JSON-RPC, string ownership, and error handling. Build device and simulator XCFramework static libraries on macOS. Add exact named-instance deletion to the iOS and Android wrappers. Cover wrapper lifecycle and the port-forward patch flow on host targets. * fix(gateway): recover TCP port-forward listeners Release an unusable TCP port-forward listener after an accept failure. Retry binding until the forward is cancelled. Keep the old listener released while rebinding so mobile sockets can recover. Expose opt-in iOS diagnostics for listener and connection events. Trace configuration removal and adapter shutdown. Add tests for recovery, release-before-rebind, and cancellation. * feat(web): persist incremental managed config patches Add a revision-CAS PATCH contract for managed configs while keeping the existing Full PUT path for compatibility and recovery. Apply Full and Patch mutations with their revision in one SQLite transaction. Reject ownership conflicts and invalidate revisions on alternate web-owned writes. Document limits, failure semantics, rollout order, and verification. Cover delta updates, conflicts, idempotency, and transaction rollback. * feat(web): apply managed config patches to live sessions Carry Patch fences and touched instance IDs into live sessions. Reconcile only those instances when the applied revision matches the Patch base. Fall back to Full reconciliation for gaps and restarts. Invalidate the applied revision around every direct runtime mutation. Fence revision advancement with the runtime cache epoch so stale reconcile rounds cannot overwrite a newer invalidation. Require deletion responses to confirm each requested instance before advancing the revision. Raise the managed PUT and PATCH body limit to 32 MiB and return typed conflicts for publisher recovery. * fix(core): retry transient accepted TCP errors Keep TCP tunnel listeners alive when an accepted socket fails during upgrade with a retryable connection-state error. Share the retryable I/O classifier with the socket listener. Cover a rejected connection followed by success and propagation of permanent errors. * feat(core): add internal Peer Relay edge projection Derive the local advertised OSPF row from physical adjacency and transport-authenticated credential relay coverage. Keep full local adjacency only in the temporary SPF snapshot so direct destinations retain a fallback route. Leave Peer Relay disabled at the public configuration seam. A follow-up change can expose the preference without coupling route projection to credential reauthorization. feat(config): expose Peer Relay routing preference Add prefer_peer_relay to public protobuf, TOML, management patch, and hosted runtime surfaces. Read the preference from live peer context so runtime config updates take effect. Refresh authenticated peer metadata when the option is enabled. Cover dynamic enable and disable in a five-node, dual-admin credential topology, including forwarded relay coverage and local fallback.
98 lines
2.2 KiB
Protocol Buffer
98 lines
2.2 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;
|
|
repeated VpnPortalClientPatch vpn_portal_clients = 15;
|
|
api.manage.ManagedCredentialSet managed_credentials = 16;
|
|
optional bool prefer_peer_relay = 17;
|
|
}
|
|
|
|
message VpnPortalClientPatch {
|
|
ConfigPatchAction action = 1;
|
|
api.manage.VpnPortalClientConfig client = 2;
|
|
}
|
|
|
|
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;
|
|
string toml_config = 2;
|
|
}
|
|
|
|
service ConfigRpc {
|
|
rpc PatchConfig(PatchConfigRequest) returns (PatchConfigResponse);
|
|
rpc GetConfig(GetConfigRequest) returns (GetConfigResponse);
|
|
}
|