(self, proxy_config: collections.OrderedDict)
Private method to configure all proxy specific setings, based on the configuration settings.
Private method to configure all proxy specific setings, based on the configuration settings.
Private method to configure all proxy specific setings based on the configuration settings .
def __configure_proxy_settings(self, proxy_config: collections.OrderedDict):
        """Private method to configure all proxy specific setings, based on the configuration settings."""
        
        if self._is_not_empty_string("address", proxy_config):
            self.check_zap_result(
                result=self.get_zap.core.set_option_proxy_chain_name(string=str(proxy_config['address'])), 
                method_name="set_option_proxy_chain_name"
            )
        if self._is_not_empty_integer("port", proxy_config):
            self.check_zap_result(
                result=self.get_zap.core.set_option_proxy_chain_port(integer=str(proxy_config['port'])), 
                method_name="set_option_proxy_chain_port"
            )
        if "skipProxyAddresses" in proxy_config and (proxy_config['skipProxyAddresses'] is not None):
            logging.debug("Disabling all possible pre existing proxy excluded domains before adding new ones.")
            self.check_zap_result(
                result=self.get_zap.core.disable_all_proxy_chain_excluded_domains(),
                method_name="add_proxy_chain_excluded_domain"
            )
            for address in proxy_config["skipProxyAddresses"]:
                logging.debug("Excluding (skip) address '%s' from global proxy setting", address)
                self.check_zap_result(
                    result=self.get_zap.core.add_proxy_chain_excluded_domain(value=address, isregex=True, isenabled=True),
                    method_name="add_proxy_chain_excluded_domain"
                )
def __configure_proxy_settings ( self , proxy_config : collections . OrderedDict ) : if self . _is_not_empty_string ( "address" , proxy_config ) : self . check_zap_result ( result = self . get_zap . core . set_option_proxy_chain_name ( string = str ( proxy_config [ 'address' ] ) ) , method_name = "set_option_proxy_chain_name" ) if self . _is_not_empty_integer ( "port" , proxy_config ) : self . check_zap_result ( result = self . get_zap . core . set_option_proxy_chain_port ( integer = str ( proxy_config [ 'port' ] ) ) , method_name = "set_option_proxy_chain_port" ) if "skipProxyAddresses" in proxy_config and ( proxy_config [ 'skipProxyAddresses' ] is not None ) : logging . debug ( "Disabling all possible pre existing proxy excluded domains before adding new ones." ) self . check_zap_result ( result = self . get_zap . core . disable_all_proxy_chain_excluded_domains ( ) , method_name = "add_proxy_chain_excluded_domain" ) for address in proxy_config [ "skipProxyAddresses" ] : logging . debug ( "Excluding (skip) address '%s' from global proxy setting" , address ) self . check_zap_result ( result = self . get_zap . core . add_proxy_chain_excluded_domain ( value = address , isregex = True , isenabled = True ) , method_name = "add_proxy_chain_excluded_domain" )