GithubHelp home page GithubHelp logo

peterfotinis / proxyreverse.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andytson/proxyreverse.js

0.0 2.0 0.0 152 KB

A simple minimal configuration reverse proxy

License: MIT License

JavaScript 100.00%

proxyreverse.js's Introduction

ProxyReverse

ProxyReverse acts as a reverse proxy, with a simple command-line interface so you can run it anywhere without having to worry about configuration files.

It can be used, for instance, to reverse proxy a local VM to the host computer automatically rewriting Host, Location and Set-Cookie headers, and rewrite html assets to appear served from the host computer.

Installation

ProxyReverse is a tool that runs on the command line.

On any system with nodejs and npm installed, open your terminal and type:

$ npm install -g proxyreverse

Create a SSL server key and certificate, for example a self-signed one:

$ openssl req -nodes -new -x509 -keyout server-key.pem -out server-cert.pem -days 360

Usage

Assuming that you are running your local web-server on a VM with a host-only interface with local access via http://my.dev/

$ proxyreverse 8080,8443 my.dev
http://my.dev is now available via: http://localhost:8080
https://my.dev is now available via: https://localhost:8443

Now you can open this link in your favorite browser and request will be proxied to your my.dev serer.

If your domain uses sub-domains for assets, proxyreverse can be told to rewrite them as well, using:

$ proxyreverse -s 8080,8443 my.dev

If your domain's SSL certificate is invalid, connections to it will fail, invalid certificates can be ignored using the --insecure (or -k) option on the command line:

$ proxyreverse -sk 8080,8443 my.dev

Known issues

  • Transitioning from http to https (or vice versa) via http redirects fails.

proxyreverse.js's People

Contributors

andytson avatar

Watchers

James Cloos avatar  avatar

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.