Merge pull request #370 from yao177/aether-rust-pioneer

fix(proxy): record manual proxy node traffic
This commit is contained in:
fawney19
2026-05-03 21:40:20 +08:00
committed by GitHub
9 changed files with 496 additions and 27 deletions

View File

@@ -5,7 +5,7 @@ use std::time::Duration;
use aether_data::repository::proxy_nodes::{
ProxyNodeHeartbeatMutation, ProxyNodeManualCreateMutation, ProxyNodeManualUpdateMutation,
ProxyNodeTunnelStatusMutation, StoredProxyNode, StoredProxyNodeEvent,
ProxyNodeTrafficMutation, ProxyNodeTunnelStatusMutation, StoredProxyNode, StoredProxyNodeEvent,
};
use aether_http::{build_http_client, HttpClientConfig};
use aether_runtime::{
@@ -551,6 +551,16 @@ impl AppState {
.map_err(|err| GatewayError::Internal(err.to_string()))
}
pub(crate) async fn record_proxy_node_traffic(
&self,
mutation: &ProxyNodeTrafficMutation,
) -> Result<bool, GatewayError> {
self.data
.record_proxy_node_traffic(mutation)
.await
.map_err(|err| GatewayError::Internal(err.to_string()))
}
pub(crate) async fn unregister_proxy_node(
&self,
node_id: &str,