mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-07 10:14:35 +00:00
allow proxy packets to be forwarded by system kernel
This commit is contained in:
@@ -68,6 +68,7 @@ pub struct GlobalCtx {
|
||||
running_listeners: Mutex<Vec<url::Url>>,
|
||||
|
||||
enable_exit_node: bool,
|
||||
proxy_forward_by_system: bool,
|
||||
no_tun: bool,
|
||||
|
||||
feature_flags: AtomicCell<PeerFeatureFlag>,
|
||||
@@ -99,6 +100,7 @@ impl GlobalCtx {
|
||||
let stun_info_collection = Arc::new(StunInfoCollector::new_with_default_servers());
|
||||
|
||||
let enable_exit_node = config_fs.get_flags().enable_exit_node;
|
||||
let proxy_forward_by_system = config_fs.get_flags().proxy_forward_by_system;
|
||||
let no_tun = config_fs.get_flags().no_tun;
|
||||
|
||||
let mut feature_flags = PeerFeatureFlag::default();
|
||||
@@ -125,6 +127,7 @@ impl GlobalCtx {
|
||||
running_listeners: Mutex::new(Vec::new()),
|
||||
|
||||
enable_exit_node,
|
||||
proxy_forward_by_system,
|
||||
no_tun,
|
||||
|
||||
feature_flags: AtomicCell::new(feature_flags),
|
||||
@@ -273,6 +276,10 @@ impl GlobalCtx {
|
||||
self.enable_exit_node
|
||||
}
|
||||
|
||||
pub fn proxy_forward_by_system(&self) -> bool {
|
||||
self.proxy_forward_by_system
|
||||
}
|
||||
|
||||
pub fn no_tun(&self) -> bool {
|
||||
self.no_tun
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user