2.2.0 • Published 2 years ago

socket-io-proxy-backend v2.2.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

socket-io-proxy-backend

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

  • any cloud or dedicated server can run Node.js installed with Reverse proxy publisher server (which is going to be our publicly reachable server)
  • a local computer can run Node.js installed with Reverse proxy backend server (which is make a connection from localhost to proxy server and serve our localhost)

This project depends on Reverse proxy publisher server

How to use

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
})

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.")
})

Installation

// with npm
npm install socket-io-proxy-backend

License

MIT

2.2.0

2 years ago

2.1.0

2 years ago

2.0.0

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago