Skip to content

Commit

Permalink
get_active_network_interface_address removed
Browse files Browse the repository at this point in the history
  • Loading branch information
ssrlive committed Nov 20, 2023
1 parent 9f3571c commit 83055c9
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 133 deletions.
9 changes: 0 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,8 @@ webpki-roots = "0.25"

[target.'cfg(target_family="unix")'.dependencies]
daemonize = "0.5"
pnet = "0.34"

[target.'cfg(target_os="android")'.dependencies]
android_logger = "0.13"
crossbeam = "0.8"
jni = { version = "0.21", default-features = false }

[target.'cfg(target_os="windows")'.dependencies]
windows = { version = "0.52", features = [
"Win32_NetworkManagement_IpHelper",
"Win32_NetworkManagement_Ndis",
"Win32_Networking_WinSock",
"Win32_Foundation",
] }
120 changes: 0 additions & 120 deletions src/active_ip_addr.rs

This file was deleted.

2 changes: 0 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
pub(crate) mod active_ip_addr;
pub(crate) mod android;
pub(crate) mod api;
pub(crate) mod base64_wrapper;
Expand All @@ -15,7 +14,6 @@ pub(crate) mod udprelay;
pub(crate) mod webapi;
pub(crate) mod weirduri;

pub use active_ip_addr::get_active_network_interface_address;
use base64_wrapper::{base64_decode, base64_encode, Base64Engine};
use bytes::BytesMut;
pub use error::{Error, Result};
Expand Down
2 changes: 0 additions & 2 deletions src/udprelay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ pub(crate) async fn handle_s5_upd_associate(
) -> Result<()> {
let listen_ip = associate.local_addr()?.ip();

let listen_ip = crate::get_active_network_interface_address().unwrap_or(listen_ip);

// listen on a random port
let udp_listener = UdpSocket::bind(SocketAddr::from((listen_ip, 0))).await;
match udp_listener.and_then(|socket| socket.local_addr().map(|addr| (socket, addr))) {
Expand Down

0 comments on commit 83055c9

Please sign in to comment.