API works. next: generate URI

This commit is contained in:
Ultradesu
2025-09-23 14:17:32 +01:00
parent 2b5b09a213
commit 572b5e19c0
12 changed files with 1026 additions and 89 deletions

View File

@@ -215,7 +215,7 @@ async fn sync_xray_state(db: DatabaseManager, xray_service: XrayService) -> Resu
for server in servers {
let endpoint = format!("{}:{}", server.hostname, server.grpc_port);
let endpoint = server.get_grpc_endpoint();
// Test connection first
match xray_service.test_connection(server.id, &endpoint).await {
@@ -394,7 +394,7 @@ async fn sync_single_server_by_id(
let desired_inbounds = get_desired_inbounds_from_db(db, &server, &inbound_repo, &template_repo).await?;
// Build endpoint
let endpoint = format!("{}:{}", server.hostname, server.grpc_port);
let endpoint = server.get_grpc_endpoint();
// Sync server
sync_server_inbounds(xray_service, server_id, &endpoint, &desired_inbounds).await?;