safer handle_intranet
This commit is contained in:
parent
83c45d772f
commit
1c3a2e475d
2 changed files with 35 additions and 14 deletions
|
|
@ -1011,6 +1011,11 @@ impl Config {
|
|||
CONFIG2.read().unwrap().socks.clone()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn is_proxy() -> bool {
|
||||
Self::get_network_type() != NetworkType::Direct
|
||||
}
|
||||
|
||||
pub fn get_network_type() -> NetworkType {
|
||||
match &CONFIG2.read().unwrap().socks {
|
||||
None => NetworkType::Direct,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue