mirror of
https://mirror.suhoan.cn/https://github.com/EasyTier/EasyTier.git
synced 2025-12-15 22:27:26 +08:00
support exit node (#121)
support exit node, proxy all traffic via one of node NOTE: this patch has not implemented automatically route management.
This commit is contained in:
@@ -233,6 +233,7 @@ impl UdpProxy {
|
||||
|
||||
let _ = self.global_ctx.get_ipv4()?;
|
||||
let hdr = packet.peer_manager_header().unwrap();
|
||||
let is_exit_node = hdr.is_exit_node();
|
||||
if hdr.packet_type != PacketType::Data as u8 {
|
||||
return None;
|
||||
};
|
||||
@@ -242,7 +243,7 @@ impl UdpProxy {
|
||||
return None;
|
||||
}
|
||||
|
||||
if !self.cidr_set.contains_v4(ipv4.get_destination()) {
|
||||
if !self.cidr_set.contains_v4(ipv4.get_destination()) && !is_exit_node {
|
||||
return None;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user