Git Product home page Git Product logo

proxyfire's Introduction

Proxyfire

Introduction

Proxyfire is a local multi proxy that replaces proxied origins in response contents with proxy target.

This is useful when your pages contain links to other domains that you are proxying, and you wan't those links to have href transformed to you the proxy address.

It is built on the http-proxy module.

Requirements

You will need node, npm, and the dependencies specified in the package.json file, that you will install with:

npm install

Usage

Require proxyfire

var CrossDomainProxyServer = require('proxyfire');

Create an array of domains you wan't to proxy

var domains = [
    'www.firstdomain.local',
    'www.seconddomain.local'
];

Create the instance and initialize

var crossDomainProxyServer = new CrossDomainProxyServer(domains, 3000);
crossDomainProxyServer.initialize();

Port 3000 is can be omitted since its the default value for starting port.

In this specific example, you will get the following output in console:

server listening on port 3000 and forwarding to www.firstdomain.local
server listening on port 3001 and forwarding to www.seconddomain.local

Finally, you connect on http://localhost:3000 or with your IP address http://x.y.z.w:3000.

You can of course set local domains on your DNS so that your machine would be accessed with an elegant domain name.

proxyfire's People

Watchers

 avatar  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.