mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-07 02:09:06 +00:00
fix: silence listener warning in feature builds
This commit is contained in:
@@ -25,7 +25,7 @@ use crate::{
|
|||||||
|
|
||||||
pub fn create_listener_by_url(
|
pub fn create_listener_by_url(
|
||||||
l: &url::Url,
|
l: &url::Url,
|
||||||
global_ctx: ArcGlobalCtx,
|
_global_ctx: ArcGlobalCtx,
|
||||||
) -> Result<Box<dyn TunnelListener>, Error> {
|
) -> Result<Box<dyn TunnelListener>, Error> {
|
||||||
Ok(match l.try_into()? {
|
Ok(match l.try_into()? {
|
||||||
TunnelScheme::Ip(scheme) => match scheme {
|
TunnelScheme::Ip(scheme) => match scheme {
|
||||||
@@ -34,7 +34,7 @@ pub fn create_listener_by_url(
|
|||||||
#[cfg(feature = "wireguard")]
|
#[cfg(feature = "wireguard")]
|
||||||
IpScheme::Wg => {
|
IpScheme::Wg => {
|
||||||
use crate::tunnel::wireguard::{WgConfig, WgTunnelListener};
|
use crate::tunnel::wireguard::{WgConfig, WgTunnelListener};
|
||||||
let nid = global_ctx.get_network_identity();
|
let nid = _global_ctx.get_network_identity();
|
||||||
let wg_config = WgConfig::new_from_network_identity(
|
let wg_config = WgConfig::new_from_network_identity(
|
||||||
&nid.network_name,
|
&nid.network_name,
|
||||||
&nid.network_secret.unwrap_or_default(),
|
&nid.network_secret.unwrap_or_default(),
|
||||||
@@ -43,7 +43,7 @@ pub fn create_listener_by_url(
|
|||||||
}
|
}
|
||||||
#[cfg(feature = "quic")]
|
#[cfg(feature = "quic")]
|
||||||
IpScheme::Quic => {
|
IpScheme::Quic => {
|
||||||
tunnel::quic::QuicTunnelListener::new(l.clone(), global_ctx.clone()).boxed()
|
tunnel::quic::QuicTunnelListener::new(l.clone(), _global_ctx.clone()).boxed()
|
||||||
}
|
}
|
||||||
#[cfg(feature = "websocket")]
|
#[cfg(feature = "websocket")]
|
||||||
IpScheme::Ws | IpScheme::Wss => {
|
IpScheme::Ws | IpScheme::Wss => {
|
||||||
|
|||||||
Reference in New Issue
Block a user