proxy-test-server

2019-02-14 admin

proxy-test-server是什么

什么是proxy-test-server,Proxy server for testing proxied connections

proxy-test-server使用教程帮助文档

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

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-53714.html

文章标题:proxy-test-server

回到顶部