Skip to content

Commit 34cf340

Browse files
Update udp_proxy.rs
1 parent edf04d3 commit 34cf340

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

‎src/udp_proxy.rs‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,10 @@ impl UdpProxyServer {
131131
if let Some(dest) = destination_map.get(&client_addr) {
132132
dest.clone()
133133
} else {
134-
// For UDP, we need to determine the route based on client info
134+
// ToDo: For UDP, we need to determine the route based on client info
135135
// or the contents of the first packet
136-
// This is a simplified implementation - in a real-world scenario,
137-
// you might need more sophisticated logic to determine the correct route
138-
136+
// This is a simplified implementation
137+
139138
// For now, use the first UDP route in the config
140139
let config_guard = config.read().await;
141140
let udp_route = config_guard.routes.iter()
@@ -260,4 +259,4 @@ fn extract_host_port(url: &str) -> String {
260259

261260
// Extract host:port part
262261
url_without_protocol.split('/').next().unwrap_or(url_without_protocol).to_string()
263-
}
262+
}

0 commit comments

Comments
 (0)