blistovmhz

Untitled

Jun 22nd, 2020
1,917
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var http = require('http'),
  2.             httpProxy = require('http-proxy');
  3.  
  4. var proxy = new httpProxy.createProxyServer({
  5.           target: {
  6.                       host: '172.16.16.38',
  7.                       port: '80'
  8.                     }
  9. });
  10. var proxyServer = http.createServer(function (req, res) {
  11.           proxy.web(req, res);
  12. });
  13.  
  14. //
  15. //// Listen to the `upgrade` event and proxy the
  16. //// WebSocket requests as well.
  17. ////
  18. proxyServer.on('upgrade', function (req, socket, head) {
  19.   proxy.ws(req, socket, head);
  20.   });
  21. console.log("listening on port 5050")
  22. proxyServer.listen(5050);
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×