mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-09 11:14:30 +00:00
refactor: handle quic proxy internally instead of use external udp port (#1743)
* deprecate quic_listen_port, add disable_relay_quic and enable_relay_foreign_network_quic * add set_src_modified to TcpProxyForWrappedSrcTrait * prioritize quic over kcp
This commit is contained in:
@@ -634,22 +634,7 @@ pub async fn subnet_proxy_three_node_test(
|
||||
subnet_proxy_test_tcp(listen_ip, target_ip).await;
|
||||
subnet_proxy_test_udp(listen_ip, target_ip).await;
|
||||
}
|
||||
|
||||
if enable_kcp_proxy && !disable_kcp_input {
|
||||
let metrics = insts[0]
|
||||
.get_global_ctx()
|
||||
.stats_manager()
|
||||
.get_metrics_by_prefix(&MetricName::TcpProxyConnect.to_string());
|
||||
assert_eq!(metrics.len(), 3);
|
||||
for metric in metrics {
|
||||
assert_eq!(1, metric.value);
|
||||
assert!(metric.labels.labels().iter().any(|l| {
|
||||
let t =
|
||||
LabelType::Protocol(TcpProxyEntryTransportType::Kcp.as_str_name().to_string());
|
||||
t.key() == l.key && t.value() == l.value
|
||||
}));
|
||||
}
|
||||
} else if enable_quic_proxy && !disable_quic_input {
|
||||
if enable_quic_proxy && !disable_quic_input {
|
||||
let metrics = insts[0]
|
||||
.get_global_ctx()
|
||||
.stats_manager()
|
||||
@@ -663,6 +648,20 @@ pub async fn subnet_proxy_three_node_test(
|
||||
t.key() == l.key && t.value() == l.value
|
||||
}));
|
||||
}
|
||||
} else if enable_kcp_proxy && !disable_kcp_input {
|
||||
let metrics = insts[0]
|
||||
.get_global_ctx()
|
||||
.stats_manager()
|
||||
.get_metrics_by_prefix(&MetricName::TcpProxyConnect.to_string());
|
||||
assert_eq!(metrics.len(), 3);
|
||||
for metric in metrics {
|
||||
assert_eq!(1, metric.value);
|
||||
assert!(metric.labels.labels().iter().any(|l| {
|
||||
let t =
|
||||
LabelType::Protocol(TcpProxyEntryTransportType::Kcp.as_str_name().to_string());
|
||||
t.key() == l.key && t.value() == l.value
|
||||
}));
|
||||
}
|
||||
} else {
|
||||
// tcp subnet proxy
|
||||
let metrics = insts[2]
|
||||
|
||||
Reference in New Issue
Block a user