JSPM

proxy-test-server

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 57
  • Score
    100M100P100Q67282F
  • License MIT

Proxy server for testing proxied connections

Package Exports

  • proxy-test-server

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (proxy-test-server) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

proxy-test-server

Proxy server for testing proxied connections

Usage

Install from npm

npm install proxy-test-server

Create HTTP proxy server

HTTP proxy supports only CONNECT requests

var HttpConnectProxy = require('../lib/server');
var proxy = new HttpConnectProxy();

proxy.listen(9999, function () {
    console.log('PROXY Server Listening');
});

proxy.on('connect', function (port, host, socket) {
    var time = new Date().toISOString().substr(0, 19).replace('T', '');
    console.log('[%s] From %s to %s:%s', time, socket.remoteAddress, host, port);
});

Test Proxy

Make a http request against proxy

curl -i -x http://127.0.0.1:9999 https://google.com

License

MIT