App-PureProxy
view release on metacpan or search on metacpan
pureproxy --host=0.0.0.0 --port=5000 --workers=10 --server Starlight
pureproxy --traffic-log=traffic.log --traffic-log-body-eol='|'
pureproxy --access-log=access.log
pureproxy --other-plackup-options
pureproxy -v
http_proxy=http://localhost:5000/ lwp-request -m get http://www.perl.org/
https_proxy=http://localhost:5000/ lwp-request -m get https://metacpan.org/
DESCRIPTION
This is pure-Perl HTTP proxy server which can be run on almost every
Perl installation.
It uses thrall pre-threading HTTP server if Perl supports threads or
starlight pre-forking HTTP server otherwise.
It supports SSL and TLS if IO::Socket::SSL is installed and IPv6 if
IO::Socket::IP is installed.
It can be fat-packed and then run with any system with standard Perl
interpreter without installing other packages. See examples directory
for fat-packed version of PureProxy script.
PureProxy is an application that accepts arguments of plackup binary
and HTTP servers like thrall or starlight.
INSTALLATION
With cpanm(1)
cpanm App::PureProxy
Directly
lwp-request -m get https://raw.githubusercontent.com/dex4er/PureProxy/master/fatpack/install.sh | sh
or
curl -qsSL https://raw.githubusercontent.com/dex4er/PureProxy/master/fatpack/install.sh | sh
or
wget --quiet -O- https://raw.githubusercontent.com/dex4er/PureProxy/master/fatpack/install.sh | sh
OPTIONS
--access-log
Specifies the pathname of a file where the access log should be
written. By default, in the development environment access logs will go
to STDERR. See plackup. (default: none)
--daemonize
Makes the process run in the background. It doesn't work (yet) in
native Windows (MSWin32). (default: 0)
-E, --env
Specifies the environment option. See plackup. (default: "deployment")
--error-log
Specify the pathname of a file where the error log should be written.
This enables you to still have access to the errors when using
--daemonize. (default: none)
--group
Changes the group ids or group names that the server should switch to
after binding to the port. The ids or names can be separated with
commas or space characters. (default: none)
-o, --host
Binds to a TCP interface. Defaults to undef, which lets most server
backends bind to the any (*) interface. This option is only valid for
servers which support TCP sockets.
-I
Specifies Perl library include paths, like perl's -I option. You may
add multiple paths by using this option multiple times. See plackup.
--ipv6
Enables IPv6 support. The IO::Socket::IP module is required. (default:
1 if IO::Socket::IP is available or 0 otherwise)
--keepalive-timeout
Timeout for persistent connections. (default: 2)
-L, --loader
Starlet changes the default loader to Delayed to make lower consumption
of the children and prevent problems with shared IO handlers. It might
be set to Plack::Loader to restore the default loader.
-M
Loads the named modules before loading the app's code. You may load
multiple modules by using this option multiple times. See plackup.
(default: none)
--main-process-delay
The Starlight nor Thrall do not synchronize their processes and require
a small delay in main process so it doesn't consume all CPU. (default:
0.1)
--max-keepalive-reqs
Max. number of requests allowed per single persistent connection. If
set to one, persistent connections are disabled. (default: 1)
( run in 1.380 second using v1.01-cache-2.11-cpan-f4a522933cf )