view release on metacpan or search on metacpan
lib/Google/Plus.pm view on Meta::CPAN
my $ua = $plus->ua;
my $ua = $plus->ua(Mojo::UserAgent->new);
User agent object that retrieves JSON from the Google+ API endpoint.
Defaults to a L<Mojo::UserAgent> object. This object will use
HTTP/HTTPS proxies when available (via C<HTTP_PROXY> and C<HTTPS_PROXY>
environment variables.)
=head1 METHODS
L<Google::Plus> implements the following methods:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Gungho/Engine/POE.pm view on Meta::CPAN
#
# Here, we detect if one of the following is true:
# 1) The user has explicitly disable DNS resolution via dns.disable = 1
# 2) The user has requested the use of a proxy via engine.client.proxy
# 3) The user has implicitly requested the use of a proxy via
# $ENV{HTTP_PROXY}
my $dns_config = delete $config{dns} || {};
unless ($dns_config->{disable} || $client_config->{Proxy} || $client_config->{proxy} || $ENV{HTTP_PROXY}) {
foreach my $key (keys %$dns_config) {
if ($key =~ /^[a-z]/) { # ah, need to make this CamelCase
my $camel = ucfirst($key);
$camel =~ s/_(\w)/uc($1)/ge;
$dns_config->{$camel} = delete $dns_config->{$key};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTTP/Status.pm view on Meta::CPAN
HTTP_PAYMENT_REQUIRED (402)
HTTP_FORBIDDEN (403)
HTTP_NOT_FOUND (404)
HTTP_METHOD_NOT_ALLOWED (405)
HTTP_NOT_ACCEPTABLE (406)
HTTP_PROXY_AUTHENTICATION_REQUIRED (407)
HTTP_REQUEST_TIMEOUT (408)
HTTP_CONFLICT (409)
HTTP_GONE (410)
HTTP_LENGTH_REQUIRED (411)
HTTP_PRECONDITION_FAILED (412)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTTP/Promise.pm view on Meta::CPAN
$self->{max_headers_size} = $MAX_HEADERS_SIZE;
$self->{max_redirect} = 7;
$self->{max_size} = undef;
$self->{medium} = $Promise::Me::SHARE_MEDIUM;
$self->{no_proxy} = [];
$self->{proxy} = $ENV{http_proxy} || $ENV{HTTP_PROXY} || undef;
$self->{proxy_authorization} = undef;
$self->{requests_redirectable} = [qw( GET HEAD )];
$self->{send_te} = 1;
$self->{serialiser} = $SERIALISER;
$self->{shared_mem_size} = $Promise::Me::RESULT_MEMORY_SIZE;
view all matches for this distribution
view release on metacpan or search on metacpan
t/23connect.t view on Meta::CPAN
plan skip_all => "This test fails on MSWin32. HTTP::Proxy is usable on Win32 with maxchild => 0"
if $^O eq 'MSWin32';
# make sure we inherit no upstream proxy
delete $ENV{$_} for qw( http_proxy HTTP_PROXY https_proxy HTTPS_PROXY );
# test CONNECT
my $test = Test::Builder->new;
# this is to work around tests in forked processes
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
use strict;
use warnings;
use ExtUtils::MakeMaker;
# require JE if at install site and no JavaScript
eval '$ENV{HTTP_PROXY_PLACE} or require JavaScript';
my @optional = $@ ? ('JE' => 0.044) : ();
WriteMakefile(
'ABSTRACT_FROM' => 'lib/HTTP/ProxyPAC.pm',
'AUTHOR' => 'Tatsuhiko Miyagawa <miyagawa@bulknews.net>',
view all matches for this distribution
view release on metacpan or search on metacpan
t/TestCurlIdentity.pm view on Meta::CPAN
my $testcount = 0;
# Clean out environment variables that might mess up
# the HTTP connection to a local host
local @ENV{qw(
HTTP_PROXY
http_proxy
HTTP_PROXY_ALL
http_proxy_all
HTTPS_PROXY
https_proxy
CGI_HTTP_PROXY
ALL_PROXY
all_proxy
)};
for( @tests ) {
view all matches for this distribution
view release on metacpan or search on metacpan
use Test::More;
BEGIN {
delete @ENV{ qw( http_proxy HTTP_PROXY ) };
if (eval { require LWP::Simple }) {
plan tests => 5;
} else {
Test::More->import(skip_all =>"LWP::Simple not installed: $@");
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTTP/Tiny.pm view on Meta::CPAN
delete $self->{proxy};
}
# http proxy
if (! exists $self->{http_proxy} ) {
# under CGI, bypass HTTP_PROXY as request sets it from Proxy header
local $ENV{HTTP_PROXY} = ($ENV{CGI_HTTP_PROXY} || "") if $ENV{REQUEST_METHOD};
$self->{http_proxy} = $ENV{http_proxy} || $ENV{HTTP_PROXY} || $self->{proxy};
}
if ( defined $self->{http_proxy} ) {
$self->_split_proxy( http_proxy => $self->{http_proxy} ); # validate
$self->{_has_proxy}{http} = 1;
lib/HTTP/Tiny.pm view on Meta::CPAN
=over 4
=item *
http_proxy or HTTP_PROXY
=item *
https_proxy or HTTPS_PROXY
lib/HTTP/Tiny.pm view on Meta::CPAN
all_proxy or ALL_PROXY
=back
If the C<REQUEST_METHOD> environment variable is set, then this might be a CGI
process and C<HTTP_PROXY> would be set from the C<Proxy:> header, which is a
security risk. If C<REQUEST_METHOD> is set, C<HTTP_PROXY> (the upper case
variant only) is ignored, but C<CGI_HTTP_PROXY> is considered instead.
Tunnelling C<https> over an C<http> proxy using the CONNECT method is
supported. If your proxy uses C<https> itself, you can not tunnel C<https>
over it.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Healthchecks.pm view on Meta::CPAN
$hc = $hc->proxy({
http => 'http://proxy.example.org',
https => 'http://proxy.example.org'
});
OPTIONAL. Proxy settings. If set to { detect => 1 }, Healthchecks will check environment variables HTTP_PROXY, http_proxy, HTTPS_PROXY, https_proxy, NO_PROXY and no_proxy for proxy information. No default.
=cut
sub _execute {
my $c = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
t/01_in_pkg.t view on Meta::CPAN
use strict;
warn '$IO::Socket::Socks::SOCKET_CLASS = ', $IO::Socket::Socks::SOCKET_CLASS, "\n";
$^W = 0;
$ENV{http_proxy} = $ENV{HTTP_PROXY} =
$ENV{https_proxy} = $ENV{HTTPS_PROXY} =
$ENV{all_proxy} = $ENV{ALL_PROXY} = undef;
SKIP: {
skip "fork, windows, sux" if $^O =~ /MSWin/i;
view all matches for this distribution
view release on metacpan or search on metacpan
script/maint_ip_world_db view on Meta::CPAN
# a real browser during one of those outages worked OK
# -- DCANTRELL
$ua->agent('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36');
# only proxy handling is via environment variables
if ($ENV{http_proxy} || $ENV{HTTP_PROXY}) {$ua->env_proxy}
# if we have a file already, get mod times of the data sources
my $latestMod = 0;
if ($replfn_exists) {
for my $url (@URLS) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Installer/cpanm.pm view on Meta::CPAN
$fatpacked{"File/pushd.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'FILE_PUSHD';
use strict;use warnings;package File::pushd;our$VERSION='1.009';our@EXPORT=qw(pushd tempd);our@ISA=qw(Exporter);use Exporter;use Carp;use Cwd qw(getcwd abs_path);use File::Path qw(rmtree);use File::Temp qw();use File::Spec;use overload q{""}=>sub {...
FILE_PUSHD
$fatpacked{"HTTP/Tiny.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'HTTP_TINY';
package HTTP::Tiny;use strict;use warnings;our$VERSION='0.056';use Carp ();my@attributes;BEGIN {@attributes=qw(cookie_jar default_headers http_proxy https_proxy keep_alive local_address max_redirect max_size proxy no_proxy timeout SSL_options verif...
sub $sub_name {
my (\$self, \$url, \$args) = \@_;
\@_ == 2 || (\@_ == 3 && ref \$args eq 'HASH')
or Carp::croak(q/Usage: \$http->$sub_name(URL, [HASHREF])/ . "\n");
return \$self->request('$req_method', \$url, \$args || {});
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Ixchel.pm view on Meta::CPAN
my $rendered_template=$ixchel->action( action=>'template', opts=>{ t=>'extend_logsize', np=>1 });
If the following values are defined, the matching ENVs are set.
.proxy.ftp -> FTP_PROXY, ftp_proxy
.proxy.http -> HTTP_PROXY, http_proxy
.proxy.https -> HTTPS_PROXY, https_proxy
.perl.cpanm_home -> PERL_CPANM_HOME
Additionally any of the variables defined under .env will also be
set. So .env.TMPDIR will set $ENV{TMPDIR}.
lib/Ixchel.pm view on Meta::CPAN
if ( defined( $self->{config}{proxy}{ftp} ) && $self->{config}{proxy}{ftp} ne '' ) {
$ENV{FTP_PROXY} = $self->{config}{proxy}{ftp};
$ENV{ftp_proxy} = $self->{config}{proxy}{ftp};
}
if ( defined( $self->{config}{proxy}{http} ) && $self->{config}{proxy}{http} ne '' ) {
$ENV{HTTP_PROXY} = $self->{config}{proxy}{http};
$ENV{http_proxy} = $self->{config}{proxy}{http};
}
if ( defined( $self->{config}{proxy}{https} ) && $self->{config}{proxy}{https} ne '' ) {
$ENV{HTTPS_PROXY} = $self->{config}{proxy}{https};
$ENV{https_proxy} = $self->{config}{proxy}{https};
view all matches for this distribution
view release on metacpan or search on metacpan
If C<proxy> is given C<undef> then the code will go directly to the
C<$site> unless a suitable environment variable is set.
If no port is given then port C<3128> is the default.
C<LJ::Simple> also supports the use the environment variables C<http_proxy>
and C<HTTP_PROXY> to store the HTTP proxy server details. The format of these
environment variables is assumed to be:
http://server[:port]/
Where C<server> is the name of the proxy server and the optional C<port> the
};
} elsif (!exists $hr->{proxy}) {
# Getting proxy details from the environment; assumes that the proxy is
# given as http://site[:port]/
# The first matching env is used.
foreach my $env (qw( http_proxy HTTP_PROXY )) {
(exists $ENV{$env}) || next;
($ENV{$env}=~/^(?:http:\/\/)([^:\/]+)(?::([0-9]+)){0,1}/o) || next;
$self->{proxy}={
host => $1,
port => $2,
view all matches for this distribution
view release on metacpan or search on metacpan
use strict;
use warnings;
use Test::More tests => 4;
use URI::file;
BEGIN { delete @ENV{ qw( http_proxy HTTP_PROXY PATH IFS CDPATH ENV BASH_ENV) }; }
use_ok( 'LWP::Curl' );
my $lwpcurl = LWP::Curl->new( );
isa_ok( $lwpcurl, 'LWP::Curl' );
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/HTTP/LocalServer.pm view on Meta::CPAN
All served HTML will have the first %s replaced by the current location.
The following entries will be removed from C<%ENV>:
HTTP_PROXY
http_proxy
CGI_HTTP_PROXY
=cut
sub spawn {
my ($class,%args) = @_;
inc/Test/HTTP/LocalServer.pm view on Meta::CPAN
bless $self,$class;
local $ENV{TEST_HTTP_VERBOSE} = 1
if (delete $args{debug});
delete @ENV{qw(HTTP_PROXY http_proxy CGI_HTTP_PROXY)};
$self->{delete} = [];
if (my $html = delete $args{html}) {
# write the html to a temp file
my ($fh,$tempfile) = File::Temp::tempfile();
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/HTTP/LocalServer.pm view on Meta::CPAN
All served HTML will have the first %s replaced by the current location.
The following entries will be removed from C<%ENV>:
HTTP_PROXY
http_proxy
CGI_HTTP_PROXY
=cut
sub spawn {
my ($class,%args) = @_;
inc/Test/HTTP/LocalServer.pm view on Meta::CPAN
bless $self,$class;
local $ENV{TEST_HTTP_VERBOSE} = 1
if (delete $args{debug});
delete @ENV{qw(HTTP_PROXY http_proxy CGI_HTTP_PROXY)};
$self->{delete} = [];
if (my $html = delete $args{html}) {
# write the html to a temp file
my ($fh,$tempfile) = File::Temp::tempfile();
view all matches for this distribution
view release on metacpan or search on metacpan
t/https_proxy.t view on Meta::CPAN
}
);
# both lower- and upper-case versions are accepted by `env_proxy`, and
# the user may have any of them set: override them all
$ENV{HTTP_PROXY} = $ENV{HTTPS_PROXY} =
$ENV{http_proxy} = $ENV{https_proxy} = "http://foo:bar\@$saddr[0]";
$ua{proxy}->env_proxy;
$ua{proxy_nokeepalive}->env_proxy;
if ($netssl) {
# Net::SSL cannot get user/pass from proxy url
view all matches for this distribution
view release on metacpan or search on metacpan
ProxyAny.pm view on Meta::CPAN
1;
__END__
=head1 NAME
LWP::UserAgent::ProxyAny - A LWP UserAgent supports both HTTP_PROXY and IE proxy
=head1 SYNOPSIS
use LWP::UserAgent::ProxyAny;
my $ua = LWP::UserAgent::ProxyAny->new;
$ua->env_proxy; # visit url with HTTP_PROXY or Win32 IE proxy settings
my $response = $ua->get('http://sourceforge.net/projects/bookbot');
if ($response->is_success) {
print $response->content; # or whatever
}
ProxyAny.pm view on Meta::CPAN
$ua->set_proxy_by_name("Default"); # $ua->env_proxy
$ua->set_proxy_by_name("127.0.0.1:8080"); # set proxy as http://127.0.0.1:8080
=head1 ABSTRACT
Extended LWP::UserAgent, which supports both HTTP_PROXY and IE proxy setting.
=head1 DESCRIPTION
This class is an extended LWP UserAgent, which can support both traditional
HTTP_PROXY settings and proxy settings of Microsoft Windows Internet Explorer.
=item $ua->env_proxy
Read proxy settings from HTTP_PROXY or CGI_HTTP_PROXY or win32 IE proxy settings.
=item $ua->set_proxy_by_name($name)
Set proxy settings from $name.
view all matches for this distribution
view release on metacpan or search on metacpan
HTTP_USER_AGENT
HTTP_REFERER
HTTP_COOKIE
HTTP_FORWARDED
HTTP_HOST
HTTP_PROXY_CONNECTION
HTTP_ACCEPT
HTTP_ACCEPT_CHARSET
HTTP_ACCEPT_LANGUAGE
HTTP_ACCEPT_ENCODING
view all matches for this distribution
view release on metacpan or search on metacpan
lib/MPMinus/REST.pm view on Meta::CPAN
402 HTTP_PAYMENT_REQUIRED Payment Required
403 HTTP_FORBIDDEN Forbidden
404 HTTP_NOT_FOUND Not Found
405 HTTP_METHOD_NOT_ALLOWED Method Not Allowed
406 HTTP_NOT_ACCEPTABLE Not Acceptable
407 HTTP_PROXY_AUTHENTICATION_REQUIRED Proxy Authentication Required
408 HTTP_REQUEST_TIMEOUT Request Timeout
409 HTTP_CONFLICT Conflict
410 HTTP_GONE Gone
411 HTTP_LENGTH REQUIRED Length Required
412 HTTP_PRECONDITION_FAILED Precondition Failed
view all matches for this distribution
view release on metacpan or search on metacpan
sa-update.raw view on Meta::CPAN
# RFC 3986: scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
$mirror =~ s{^([a-z][a-z0-9.+-]*)://}{}si; # strip scheme like http://
my $scheme = lc($1);
# No DNS check needed for proxied connections (caveat: no_proxy is not checked)
my $http_proxy = (defined $ENV{"http_proxy"} && $ENV{"http_proxy"} =~ /\S/) ||
(defined $ENV{"HTTP_PROXY"} && $ENV{"HTTP_PROXY"} =~ /\S/);
my $https_proxy = (defined $ENV{"https_proxy"} && $ENV{"https_proxy"} =~ /\S/) ||
(defined $ENV{"HTTPS_PROXY"} && $ENV{"HTTPS_PROXY"} =~ /\S/);
return 1 if $scheme eq "http" && $http_proxy;
return 1 if $scheme eq "https" && $https_proxy;
# No DNS check needed for IPv4 or IPv6 address literal
view all matches for this distribution
view release on metacpan or search on metacpan
5ï¼æ°å¢UploadQRcodeæä»¶ï¼å¯ä»¥å°äºç»´ç ä¸ä¼ è³äºåå¨è·åå°urlå°å
6ï¼ç»å½æååå 餿®ççäºç»´ç æä»¶
2016-08-10 Mojo::Webqq v1.8.4
1ï¼newæ¹æ³å¢å update_intervalåæ° é»è®¤600ç§ï¼ç¨äºæ§å¶å®¢æ·ç«¯å®æ¶æ´æ°é¢ç
2ï¼æ¯æèªå¨æ£æµç³»ç»ç代ç设置ï¼éè¿ç¯å¢åé HTTP_PROXY/HTTPS_PROXY) æè°¢ @linux0ne åé¦
3ï¼input_qrcodeäºä»¶åæ°ä¸å¢å åå§äºç»´ç æ°æ®
2016-07-07 Mojo::Webqq v1.8.3
1ï¼newæ¹æ³ä¸æ°å¢ignore_1202åæ°ï¼å¯¹åéæ¶æ¯è¿åç¶æç 1202æ·»å é
置项è¿è¡éæ©æ§å¤ç
2ï¼ä¿®å¤ProgramCodeä¸å¯ç¨çé误
view all matches for this distribution
view release on metacpan or search on metacpan
2016-08-10 Mojo::Weixin v1.1.7
1ï¼ä¿®å¤KnowledgeBase2æä»¶å¥½åæ¶æ¯ä¸çæçbug
2ï¼Openwxæä»¶åæ°ä¸datatype=jsonpçæ¹å¼æ¯æè·¨å访é®
3ï¼input_qrcodeäºä»¶åæ°å¢å äºç»´ç åå§æ°æ®
4ï¼æ¯æèªå¨æ£æµç³»ç»ç代ç设置ï¼éè¿ç¯å¢åé HTTP_PROXY/HTTPS_PROXY)
5ï¼ä¸è½½çåªä½æä»¶æ¯æè¯å«æ´å¤æä»¶ç±»åæ¥å®ä¹æ©å±å
6ï¼æ¯æåéåæ¥æ¶ææ¬ãå¾çãè¯é³ãçè§é¢ã表æ
æ¶æ¯ç±»å
7ï¼ç¼è§£ç±äºåéåªä½æ¶æ¯æ¶ä¼åºç°æ¥æ¶æ¶æ¯è¿å
¥æ»å¾ªç¯ç宿¹é®é¢
8ï¼æ·»å è·å头忹æ³ï¼Openwxæä»¶æ·»å /openwx/get_avatarè·å头åapiæ¥å£
view all matches for this distribution
view release on metacpan or search on metacpan
t/register.t view on Meta::CPAN
use lib '.';
use t::Helper;
$ENV{HTTP_PROXY} = 'example.com';
$ENV{NO_PROXY} = 'mojolicious.org';
$ENV{no_proxy} = '';
ok !eval '$undeclared_variable=123', 'strict is enabled';
view all matches for this distribution
view release on metacpan or search on metacpan
examples/proxy.pl view on Meta::CPAN
#
# A simple HTTP proxy server for debugging
#
# $ HTTP_PROXY=http://127.0.0.1:3000 mojo get http://mojolicious.org
#
use Mojolicious::Lite -signatures;
any '/*whatever' => {whatever => ''} => sub ($c) {
my $req = $c->req;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Music/Audioscrobbler/MPD.pm view on Meta::CPAN
Options for Music::Tag
=item proxy_server
Specify a procy server in the form http://proxy.server.tld:8080. Please note that environment is checked for HTTP_PROXY, so you may not need this option.
=item allow_stream
If set to true, will scrobble HTTP streams.
view all matches for this distribution
view release on metacpan or search on metacpan
htdocs/src-min/mode-apache_conf.js view on Meta::CPAN
define("ace/mode/apache_conf_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={s...
view all matches for this distribution
view release on metacpan or search on metacpan
FROM deriv/dzil
ARG HTTP_PROXY
WORKDIR /app
# Conditional copy - we want whichever files exist, and we'd typically expect to see at least one
ONBUILD COPY aptfil[e] cpanfil[e] dist.in[i] /app/
ONBUILD RUN prepare-apt-cpan.sh \
view all matches for this distribution