Git Product home page Git Product logo

overproxy's Introduction

overproxy

Overriding HTTP/HTTPS Proxy

This tool is used for overriding resources on published web sites with local ones.

Installation

npm install -g overproxy

Usage

To override from http://example.org/ using current folder, you can run:

overproxy -t http://example.org -l . 

As the result you should have:

Overriding proxy for http://example.org/ from /Users/olostan/temp is ready on http://localhost:8080

After that opening http://localhost:8080/ will open example.org, except files from folder where overproxy was run.

Notices

  • Using 'compress' option enable very agressive caching, so overriden content will not be re-read when changed.
  • If you would like to see result on 'http://example.org', you can modify 'hosts' file.

Full usage:

  Usage: overproxy [options]


  Options:

    -V, --version                output the version number
    -l, --local <path>           Path where local overrides are stored (default: .)
    -t, --target <url>           Target URL
    -p, --port <port>            Port number to use (default: 8080)
    -c, --compress               Use compression when proxying local files (WARNING: aggressive caching)
    -s, --ssl                    Use SSL (key and cert are required)
    -k, --key <path-to-key.pem>  SSL Key (if SSL is enabled)
    --cert <path-to-cert.pem>    SSL Certificate (if SSL is enabled)
    -h, --help                   output usage information

overproxy's People

Contributors

olostan avatar

Stargazers

Pip Rees avatar surfmuggle avatar

Watchers

 avatar

overproxy's Issues

404 errors due to incorrect paths

Great tool! I've tested it out on Mozilla and Google's home page using the index.html file as my test file and works as expected. However, when I've tried using the tool on a client site from within their network all the domain files are being served as if they were on my local. The only file I saved was their index.html so I'm seeing many 404 resource errors and the page isn't rendering properly. My goal is to be able to use lighthouse to do an audit with local overrides.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.