Skip to content
This repository was archived by the owner on Nov 19, 2023. It is now read-only.
This repository was archived by the owner on Nov 19, 2023. It is now read-only.

Nothing works on Node 16 #68

@mifi

Description

@mifi

This example https://github.com/h2non/toxy/blob/master/examples/bandwidth-limit.js or even this simple code:

const toxy = require('toxy')
const http = require('http');

const proxy = toxy()

const rules = proxy.rules
const poisons = proxy.poisons

proxy
  .forward('http://httpbin.org')

proxy.all('/*')

proxy.listen(3000)
console.log('Server listening on port:', 3000)

...doesn't work.

When connecting with curl:

curl -vvv http://localhost:3000/ 
*   Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 3000 (#0)
> GET / HTTP/1.1
> Host: localhost:3000
> User-Agent: curl/7.64.1
> Accept: */*
> 
* Empty reply from server
* Connection #0 to host localhost left intact
curl: (52) Empty reply from server
* Closing connection 0

Works fine with node v10.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions