From: Fabian Keil Date: Sat, 19 Dec 2020 23:46:25 +0000 (+0100) Subject: privoxy-regression-test: Use http://127.0.0.1:8118/ as default privoxy address X-Git-Tag: v_3_0_30~185 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=42d1e40b5432cdf8124ee7cc94030381140ea026 privoxy-regression-test: Use 127.0.0.1:8118/ as default privoxy address ... unless http_proxy is set through the environment. --- diff --git a/tools/privoxy-regression-test.pl b/tools/privoxy-regression-test.pl index 49d2804f..5c1a86dc 100755 --- a/tools/privoxy-regression-test.pl +++ b/tools/privoxy-regression-test.pl @@ -53,6 +53,7 @@ use constant { CLI_FORKS => 0, CLI_SLEEP_TIME => 0, + PRIVOXY_ADDRESS => 'http://127.0.0.1:8118/', PRIVOXY_CGI_URL => 'http://p.p/', FELLATIO_URL => 'http://127.0.0.1:8080/', LEADING_LOG_DATE => 1, @@ -90,6 +91,7 @@ sub init_our_variables() { our $leading_log_date = LEADING_LOG_DATE; our $privoxy_cgi_url = PRIVOXY_CGI_URL; our $log_level = get_default_log_level(); + our $proxy = defined $ENV{'http_proxy'} ? $ENV{'http_proxy'} : PRIVOXY_ADDRESS; } sub get_default_log_level() { @@ -1703,7 +1705,7 @@ Options and their default values if they have any: [--max-level $cli_options{'max-level'}] [--max-time $cli_options{'max-time'}] [--min-level $cli_options{'min-level'}] - [--privoxy-address] + [--privoxy-address $cli_options{'privoxy-address'}] [--privoxy-cgi-prefix $privoxy_cgi_url] [--retries $cli_options{'retries'}] [--show-skipped-tests] @@ -1730,6 +1732,7 @@ sub init_cli_options() { our %cli_options; our $log_level; + our $proxy; $cli_options{'debug'} = $log_level; $cli_options{'forks'} = CLI_FORKS; @@ -1739,6 +1742,7 @@ sub init_cli_options() { $cli_options{'min-level'} = CLI_MIN_LEVEL; $cli_options{'sleep-time'}= CLI_SLEEP_TIME; $cli_options{'retries'} = CLI_RETRIES; + $cli_options{'privoxy-address'} = $proxy; } sub parse_cli_options() { @@ -2043,8 +2047,9 @@ above or equal to the numerical B. B<--privoxy-address proxy-address> Privoxy's listening address. If it's not set, the value of the environment variable http_proxy -will be used. B has to be specified in http_proxy -syntax. +will be used unless the variable isn't set in which case +http://127.0.0.1:8118/ will be used. B has to +be specified in http_proxy syntax. B<--privoxy-cgi-prefix privoxy-cgi-prefix> The prefix to use when building URLs that are supposed to reach Privoxy's CGI interface.