mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-08-07 13:09:46 +00:00
chore: update Rust to 2024 edition (#2066)
This commit is contained in:
@@ -15,18 +15,18 @@ use crate::{
|
||||
log,
|
||||
},
|
||||
instance::proxy_cidrs_monitor::ProxyCidrsMonitor,
|
||||
peers::{peer_manager::PeerManager, recv_packet_from_chan, PacketRecvChanReceiver},
|
||||
peers::{PacketRecvChanReceiver, peer_manager::PeerManager, recv_packet_from_chan},
|
||||
tunnel::{
|
||||
common::{reserve_buf, FramedWriter, TunnelWrapper, ZCPacketToBytes},
|
||||
packet_def::{ZCPacket, ZCPacketType, TAIL_RESERVED_SIZE},
|
||||
StreamItem, Tunnel, TunnelError, ZCPacketSink, ZCPacketStream,
|
||||
common::{FramedWriter, TunnelWrapper, ZCPacketToBytes, reserve_buf},
|
||||
packet_def::{TAIL_RESERVED_SIZE, ZCPacket, ZCPacketType},
|
||||
},
|
||||
};
|
||||
|
||||
use byteorder::WriteBytesExt as _;
|
||||
use bytes::{BufMut, BytesMut};
|
||||
use cidr::{Ipv4Inet, Ipv6Inet};
|
||||
use futures::{lock::BiLock, ready, SinkExt, Stream, StreamExt};
|
||||
use futures::{SinkExt, Stream, StreamExt, lock::BiLock, ready};
|
||||
use pin_project_lite::pin_project;
|
||||
use pnet::packet::{ipv4::Ipv4Packet, ipv6::Ipv6Packet};
|
||||
use tokio::{
|
||||
@@ -530,7 +530,9 @@ impl VirtualNic {
|
||||
Ok(_) => tracing::info!("add_self_to_firewall_allowlist successful!"),
|
||||
Err(error) => {
|
||||
log::warn!(%error, "Failed to add Easytier to firewall allowlist, Subnet proxy and KCP proxy may not work properly.");
|
||||
log::warn!("You can add firewall rules manually, or use --use-smoltcp to run with user-space TCP/IP stack.");
|
||||
log::warn!(
|
||||
"You can add firewall rules manually, or use --use-smoltcp to run with user-space TCP/IP stack."
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -768,7 +770,7 @@ impl VirtualNic {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn get_ifcfg(&self) -> impl IfConfiguerTrait {
|
||||
pub fn get_ifcfg(&self) -> impl IfConfiguerTrait + use<> {
|
||||
IfConfiger {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user