socket-io-reverse-proxy-server

1.1.0 • Public • Published

socket-io-reverse-proxy-server

Features

Helps developers to reverse proxy their localhost via socket.io on on aws, heroku or any server can run node.js Uses socket.io to make a one way reverse proxy

Requirements

This project works with a Reverse proxy backend server

How to use

Sample Publisher Server Code:

const proxyServer  = require('socket-io-reverse-proxy-server')
const proxyPublisherServer = proxyServer({
    secretKey:"very_secret_key"
})

proxyPublisherServer.listen(80,(e)=>{
    console.log("Proxy Publisher server running and waiting for socket-io-proxy-backend's connection.")
})

Sample Localhost Server Code:

const proxyBackend  = require('socket-io-proxy-backend')

const proxyBackendClient =  proxyBackend({
    //its your localhost
    server :"http://localhost",//its default
    port : 80, //its default
    //secret key for authentication with proxy publisher server
    secretKey: "very_secret_key",
})
//Publish localhost to cloud
const socket  = proxyBackendClient.publish({
    //its your cloud server
    server : "http://ec2-3-120-246-199.eu-central-1.compute.amazonaws.com/", // our cloud server's publicly reachable address
    port : 80  //its default
})

Installation

// with npm
npm install socket-io-reverse-proxy-server

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i socket-io-reverse-proxy-server

Weekly Downloads

0

Version

1.1.0

License

ISC

Unpacked Size

6.16 kB

Total Files

4

Last publish

Collaborators

  • msacar