http-tunneling-proxy

2019-11-10 admin

http-tunneling-proxy是什么

什么是http-tunneling-proxy,fairly simple http tunneling proxy

http-tunneling-proxy使用教程帮助文档

http-tunneling-proxy

npm Travis

This is a simple, minimally modifiable HTTP tunneling proxy written in Node.js. It is based on a snippet available in the Node.js docs. The module exposes a single function and a CLI application for launching a local proxy.

CLI

http-tunneling-proxy [--port p] [--host h]

This command will spawn a local HTTP tunneling proxy, bound to the specified port and hostname. Port defaults to 3030, while host defaults to 127.0.0.1.

API

createProxyServer([callback])

This method will return a fresh, unbound http.Server instance that can be bound via listen(). The callback function will be called at each request:

const createProxyServer = require('http-tunneling-proxy');

const proxyServer = createProxyServer(req => {
  console.log(`${req.method} ${req.url}`);
});

proxyServer.listen(3030);

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

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

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

文章标题:http-tunneling-proxy

回到顶部