24 Nov 2009 14:53:53 UTC
- Distribution: HTTP-Proxy-Selective
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (205 / 0 / 0)
- KwaliteeBus factor: 7
- 60.45% Coverage
- License: mit
- Activity24 month
- Download (38.54KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionBOBTFISH Tomas Doran
selective_proxy - Simple HTTP Proxy which can be configured to serve some paths from locations on local disk.
# Install, standard (MacOS/Linux). perl Makefile.PL make sudo make install # Install, .exe version (can be copied to other systems without perl). Needs the PAR::Dist and PAR::Packer modules from CPAN. # Yes, this is hacky, there should be Makefile targets to do this. I'm speaking to the Module::Install author about it, # so hopefully this will be less fugly in the next release :) perl Makefile.PL make par PAR_PROGNAME=selective_proxy pp HTTP-Proxy-Selective-0.1-darwin-thread-multi-2level-5.8.6.par -o selective_proxy sudo cp selective_proxy /usr/local/bin/ # Run (Installed) selective_proxy example_config.ini # Run (without installing) perl Makefile.PL make perl -Iblib/lib script/selective_proxy example_config.ini
selective_proxyacts as a filtering web proxy. You pass it a configuration file when started, which contains a list of sites and paths. Any GET or HEAD HTTP requests which match one of the sites and paths configured is served from local disk by the proxy.
# Note that more options are available, please see example_config.ini in the distribution for usage. port = 3128 [search.cpan.org] /s/=/tmp/css /stuff/=/tmp/stuff [www.google.com] /js/=/tmp/js /some/file.jpg=/tmp/somefile.jpg
When you want to map an entire directory (as opposed to a specific file), then use of the trailing slash (as shown in the examples above) is highly recommended, otherwise you can and will confuse yourself with unintended side effects.
- HTTP::Proxy::Selective - Library module used by and shipped with this script.
- HTTP::Proxy - Provides the basis for this software.
- Catalyst::Engine::HTTP - Many parts of the HTTP server were ripped out of this module.
Tomas Doran, <email@example.com>
This software is based upon a number of other open source projects, and builds on software originally implemented by the following people.
- Philippe (BooK) Bruhat - HTTP::Proxy, the basis for this module.
- Sebastian Riedel, Andy Grubman, Dan Kubb, Sascha Kiefer - Catalyst::Engine::HTTP, inspiration as a pure perl web server.
- Jesse Vincent - HTTP::Server::Simple, which Catalyst::Engine::HTTP stole a lot of code from..
Copyright 2008 Tomas Doran. Some rights reserved.
The development of this software was 100% funded by Venda (http://www.venda.com).
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Venda Ltd. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Module Install Instructions
To install HTTP::Proxy::Selective, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install HTTP::Proxy::Selective
For more information on module installation, please visit the detailed CPAN module installation guide.