mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-09-03 01:25:37 +00:00
fix: register PeerCenterRpc in management API server so CLI peer-center works (#1929)
PeerCenterRpc was only registered in the per-instance peer-to-peer RPC manager (domain = network_name), but not in the management API server (domain = ""). The CLI connects to the management API with an empty domain, causing "Invalid service name: PeerCenterRpc" errors. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
Copilot
parent
9e9916efa5
commit
eeb507d6ea
@@ -17,6 +17,7 @@ use crate::{
|
||||
logger::LoggerRpcServer,
|
||||
manage::WebClientServiceServer,
|
||||
},
|
||||
peer_rpc::PeerCenterRpcServer,
|
||||
rpc_impl::{service_registry::ServiceRegistry, standalone::StandAloneServer},
|
||||
rpc_types::error::Error,
|
||||
},
|
||||
@@ -24,8 +25,9 @@ use crate::{
|
||||
acl_manage::AclManageRpcService, config::ConfigRpcService,
|
||||
connector_manage::ConnectorManageRpcService, instance_manage::InstanceManageRpcService,
|
||||
logger::LoggerRpcService, mapped_listener_manage::MappedListenerManageRpcService,
|
||||
peer_manage::PeerManageRpcService, port_forward_manage::PortForwardManageRpcService,
|
||||
proxy::TcpProxyRpcService, stats::StatsRpcService, vpn_portal::VpnPortalRpcService,
|
||||
peer_center::PeerCenterManageRpcService, peer_manage::PeerManageRpcService,
|
||||
port_forward_manage::PortForwardManageRpcService, proxy::TcpProxyRpcService,
|
||||
stats::StatsRpcService, vpn_portal::VpnPortalRpcService,
|
||||
},
|
||||
tunnel::{tcp::TcpTunnelListener, TunnelListener},
|
||||
web_client::DefaultHooks,
|
||||
@@ -149,6 +151,11 @@ fn register_api_rpc_service(
|
||||
)),
|
||||
"",
|
||||
);
|
||||
|
||||
registry.register(
|
||||
PeerCenterRpcServer::new(PeerCenterManageRpcService::new(instance_manager.clone())),
|
||||
"",
|
||||
);
|
||||
}
|
||||
|
||||
fn parse_rpc_portal(rpc_portal: Option<String>) -> anyhow::Result<SocketAddr> {
|
||||
|
||||
Reference in New Issue
Block a user