mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-08-06 04:29:52 +00:00
021f523431
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.
78 lines
1.7 KiB
Protocol Buffer
78 lines
1.7 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
import "common.proto";
|
|
import "peer_rpc.proto";
|
|
|
|
package core.peer;
|
|
|
|
message PeerConnStats {
|
|
uint64 rx_bytes = 1;
|
|
uint64 tx_bytes = 2;
|
|
|
|
uint64 rx_packets = 3;
|
|
uint64 tx_packets = 4;
|
|
|
|
uint64 latency_us = 5;
|
|
}
|
|
|
|
message PeerConnInfo {
|
|
string conn_id = 1;
|
|
uint32 my_peer_id = 2;
|
|
uint32 peer_id = 3;
|
|
repeated string features = 4;
|
|
common.TunnelInfo tunnel = 5;
|
|
PeerConnStats stats = 6;
|
|
float loss_rate = 7;
|
|
bool is_client = 8;
|
|
string network_name = 9;
|
|
bool is_closed = 10;
|
|
bytes noise_local_static_pubkey = 11;
|
|
bytes noise_remote_static_pubkey = 12;
|
|
peer_rpc.SecureAuthLevel secure_auth_level = 13;
|
|
peer_rpc.PeerIdentityType peer_identity_type = 14;
|
|
}
|
|
|
|
message PeerInfo {
|
|
uint32 peer_id = 1;
|
|
repeated PeerConnInfo conns = 2;
|
|
common.UUID default_conn_id = 3;
|
|
repeated common.UUID directly_connected_conns = 4;
|
|
}
|
|
|
|
message Route {
|
|
uint32 peer_id = 1;
|
|
common.Ipv4Inet ipv4_addr = 2;
|
|
|
|
uint32 next_hop_peer_id = 3;
|
|
int32 cost = 4;
|
|
int32 path_latency = 11;
|
|
|
|
repeated string proxy_cidrs = 5;
|
|
string hostname = 6;
|
|
common.StunInfo stun_info = 7;
|
|
string inst_id = 8;
|
|
string version = 9;
|
|
common.PeerFeatureFlag feature_flag = 10;
|
|
|
|
optional uint32 next_hop_peer_id_latency_first = 12;
|
|
optional int32 cost_latency_first = 13;
|
|
optional int32 path_latency_latency_first = 14;
|
|
|
|
common.Ipv6Inet ipv6_addr = 15;
|
|
common.Ipv6Inet public_ipv6_addr = 16;
|
|
common.Ipv6Inet ipv6_public_addr_prefix = 17;
|
|
}
|
|
|
|
message PublicIpv6LeaseInfo {
|
|
uint32 peer_id = 1;
|
|
string inst_id = 2;
|
|
common.Ipv6Inet leased_addr = 3;
|
|
int64 valid_until_unix_seconds = 4;
|
|
bool reused = 5;
|
|
}
|
|
|
|
message ListPublicIpv6InfoResponse {
|
|
common.Ipv6Inet provider_prefix = 1;
|
|
repeated PublicIpv6LeaseInfo provider_leases = 2;
|
|
}
|