pub struct ProxyGroupConfig {Show 13 fields
pub name: String,
pub group_type: ProxyGroupType,
pub proxies: Vec<String>,
pub using_provider: Vec<String>,
pub url: String,
pub interval: u32,
pub timeout: u32,
pub tolerance: u32,
pub strategy: BalanceStrategy,
pub lazy: bool,
pub disable_udp: bool,
pub persistent: bool,
pub evaluate_before_use: bool,
}Expand description
Configuration for a proxy group
Fields§
§name: StringName of the proxy group
group_type: ProxyGroupTypeType of the proxy group
proxies: Vec<String>List of proxy names in this group
using_provider: Vec<String>List of provider names used by this group
url: StringURL for testing
interval: u32Interval in seconds between tests
timeout: u32Timeout in seconds for tests
tolerance: u32Tolerance value for tests
strategy: BalanceStrategyStrategy for load balancing
lazy: boolWhether to use lazy loading
disable_udp: boolWhether to disable UDP support
persistent: boolWhether to persist connections
evaluate_before_use: boolWhether to evaluate before use
Implementations§
Source§impl ProxyGroupConfig
impl ProxyGroupConfig
Sourcepub fn new(name: String, group_type: ProxyGroupType) -> Self
pub fn new(name: String, group_type: ProxyGroupType) -> Self
Create a new proxy group config
Sourcepub fn strategy_str(&self) -> &'static str
pub fn strategy_str(&self) -> &'static str
Get string representation of the balance strategy
Trait Implementations§
Source§impl Clone for ProxyGroupConfig
impl Clone for ProxyGroupConfig
Source§fn clone(&self) -> ProxyGroupConfig
fn clone(&self) -> ProxyGroupConfig
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProxyGroupConfig
impl Debug for ProxyGroupConfig
Source§impl Default for ProxyGroupConfig
impl Default for ProxyGroupConfig
Source§impl From<&ProxyGroupConfig> for ClashProxyGroup
impl From<&ProxyGroupConfig> for ClashProxyGroup
Source§fn from(config: &ProxyGroupConfig) -> Self
fn from(config: &ProxyGroupConfig) -> Self
Converts to this type from the input type.
Source§impl Into<ProxyGroupConfig> for ProxyGroupConfigInToml
impl Into<ProxyGroupConfig> for ProxyGroupConfigInToml
Source§fn into(self) -> ProxyGroupConfig
fn into(self) -> ProxyGroupConfig
Converts this type into the (usually inferred) input type.
Auto Trait Implementations§
impl Freeze for ProxyGroupConfig
impl RefUnwindSafe for ProxyGroupConfig
impl Send for ProxyGroupConfig
impl Sync for ProxyGroupConfig
impl Unpin for ProxyGroupConfig
impl UnwindSafe for ProxyGroupConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more