示例#1
0
 public ProxyGroup(ProxyGroup pg)
 {
     m_szName         = pg.m_szName;
     m_isEnabled      = pg.m_isEnabled;
     m_iSelectedIndex = pg.m_iSelectedIndex;
     m_applyRule      = new ApplyRule(pg.m_applyRule);
     m_listProxyItems = new List <ProxyItem>(pg.m_listProxyItems);
 }
示例#2
0
 public ProxyGroup()
 {
     m_szName         = String.Empty;
     m_isEnabled      = false;
     m_iSelectedIndex = 0;
     m_listProxyItems = new List <ProxyItem>();
     m_applyRule      = new ApplyRule();
 }
示例#3
0
 public ApplyRule(ApplyRule ar)
 {
     m_bIdFilter         = ar.m_bIdFilter;
     m_szIdFilter        = ar.m_szIdFilter;
     m_bNameFilter       = ar.m_bNameFilter;
     m_szNameFilter      = ar.m_szNameFilter;
     m_bIpAddrFilter     = ar.m_bIpAddrFilter;
     m_szIpAddrFilter    = ar.m_szIpAddrFilter;
     m_bSubMaskFilter    = ar.m_bSubMaskFilter;
     m_szSubMaskFilter   = ar.m_szSubMaskFilter;
     m_bGatewayFilter    = ar.m_bGatewayFilter;
     m_szGatewayFilter   = ar.m_szGatewayFilter;
     m_bDnsAddrFilter    = ar.m_bDnsAddrFilter;
     m_szDnsAddrFilter   = ar.m_szDnsAddrFilter;
     m_bDnsSuffixFilter  = ar.m_bDnsSuffixFilter;
     m_szDnsSuffixFilter = ar.m_szDnsSuffixFilter;
 }
示例#4
0
 public ApplyRule(ApplyRule ar)
 {
     m_bIdFilter = ar.m_bIdFilter;
     m_szIdFilter = ar.m_szIdFilter;
     m_bNameFilter = ar.m_bNameFilter;
     m_szNameFilter = ar.m_szNameFilter;
     m_bIpAddrFilter = ar.m_bIpAddrFilter;
     m_szIpAddrFilter = ar.m_szIpAddrFilter;
     m_bSubMaskFilter = ar.m_bSubMaskFilter;
     m_szSubMaskFilter = ar.m_szSubMaskFilter;
     m_bGatewayFilter = ar.m_bGatewayFilter;
     m_szGatewayFilter = ar.m_szGatewayFilter;
     m_bDnsAddrFilter = ar.m_bDnsAddrFilter;
     m_szDnsAddrFilter = ar.m_szDnsAddrFilter;
     m_bDnsSuffixFilter = ar.m_bDnsSuffixFilter;
     m_szDnsSuffixFilter = ar.m_szDnsSuffixFilter;
 }
示例#5
0
        private bool IsRuleMatched(ApplyRule rule)
        {
            bool ret = true;

            if (ret && rule.m_bIdFilter)
            {
                ret &= IsExpressionMatched(rule.m_szIdFilter,
                                           m_detector.ActiveNetworkId());
            }
            if (ret && rule.m_bNameFilter)
            {
                ret &= IsExpressionMatched(rule.m_szNameFilter,
                                           m_detector.ActiveNetworkName());
            }
            if (ret && rule.m_bIpAddrFilter)
            {
                ret &= IsExpressionMatched(rule.m_szIpAddrFilter,
                                           m_detector.ActiveNetworkIPAddress());
            }
            if (ret && rule.m_bSubMaskFilter)
            {
                ret &= IsExpressionMatched(rule.m_szSubMaskFilter,
                                           m_detector.ActiveNetworkSubMask());
            }
            if (ret && rule.m_bGatewayFilter)
            {
                ret &= IsExpressionMatched(rule.m_szGatewayFilter,
                                           m_detector.ActiveNetworkGateway());
            }
            if (ret && rule.m_bDnsAddrFilter)
            {
                ret &= IsExpressionMatched(rule.m_szDnsAddrFilter,
                                           m_detector.ActiveNetworkDnsAddress());
            }
            if (ret && rule.m_bDnsSuffixFilter)
            {
                ret &= IsExpressionMatched(rule.m_szDnsSuffixFilter,
                                           m_detector.ActiveNetworkDnsSuffix());
            }
            return(ret);
        }
示例#6
0
 public ProxyGroup(ProxyGroup pg)
 {
     m_szName = pg.m_szName;
     m_isEnabled = pg.m_isEnabled;
     m_iSelectedIndex = pg.m_iSelectedIndex;
     m_applyRule = new ApplyRule(pg.m_applyRule);
     m_listProxyItems = new List<ProxyItem>(pg.m_listProxyItems);
 }
示例#7
0
 public ProxyGroup()
 {
     m_szName = String.Empty;
     m_isEnabled = false;
     m_iSelectedIndex = 0;
     m_listProxyItems = new List<ProxyItem>();
     m_applyRule = new ApplyRule();
 }
示例#8
0
 private bool IsRuleMatched(ApplyRule rule)
 {
     bool ret = true;
     if (ret && rule.m_bIdFilter) {
         ret &= IsExpressionMatched(rule.m_szIdFilter,
             m_detector.ActiveNetworkId());
     }
     if (ret && rule.m_bNameFilter) {
         ret &= IsExpressionMatched(rule.m_szNameFilter,
             m_detector.ActiveNetworkName());
     }
     if (ret && rule.m_bIpAddrFilter) {
         ret &= IsExpressionMatched(rule.m_szIpAddrFilter,
             m_detector.ActiveNetworkIPAddress());
     }
     if (ret && rule.m_bSubMaskFilter) {
         ret &= IsExpressionMatched(rule.m_szSubMaskFilter,
             m_detector.ActiveNetworkSubMask());
     }
     if (ret && rule.m_bGatewayFilter) {
         ret &= IsExpressionMatched(rule.m_szGatewayFilter,
             m_detector.ActiveNetworkGateway());
     }
     if (ret && rule.m_bDnsAddrFilter) {
         ret &= IsExpressionMatched(rule.m_szDnsAddrFilter,
             m_detector.ActiveNetworkDnsAddress());
     }
     if (ret && rule.m_bDnsSuffixFilter) {
         ret &= IsExpressionMatched(rule.m_szDnsSuffixFilter,
             m_detector.ActiveNetworkDnsSuffix());
     }
     return ret;
 }