Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jankaszel/http-tunneling-proxy
fairly simple http tunneling proxy
https://github.com/jankaszel/http-tunneling-proxy
http http-tunnel nodejs proxy
Last synced: 17 days ago
JSON representation
fairly simple http tunneling proxy
- Host: GitHub
- URL: https://github.com/jankaszel/http-tunneling-proxy
- Owner: jankaszel
- License: mit
- Created: 2017-01-11T12:26:34.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-25T09:16:07.000Z (almost 8 years ago)
- Last Synced: 2024-10-17T00:58:30.134Z (22 days ago)
- Topics: http, http-tunnel, nodejs, proxy
- Language: JavaScript
- Size: 32.2 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# http-tunneling-proxy
[![npm](https://img.shields.io/npm/v/http-tunneling-proxy.svg)](https://www.npmjs.com/package/http-tunneling-proxy)
[![Travis](https://travis-ci.org/fallafeljan/http-tunneling-proxy.svg)]()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](https://nodejs.org/api/http.html#http_event_connect). 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`](https://nodejs.org/api/http.html#http_class_http_server)
instance that can be bound via `listen()`. The callback function
will be called at each request:```js
const createProxyServer = require('http-tunneling-proxy');const proxyServer = createProxyServer(req => {
console.log(`${req.method} ${req.url}`);
});proxyServer.listen(3030);
```