This is a test repository. Prod at serverless-proxy.
Attempt a full duplex (ref) request / response with Socket Workers.
pip.jsattempts full duplex req / res with 3 functions that use 3 subtly different techniques to do so:chunk,pipe, andpipe2. All succeed.- The other function,
fixed(derived from Cloudflare's documentation) works, but it isn't piping theRequest.body(ReadableStream) through toSocket.writable.
denopip.jsdoes the same thing aspip.jsbut for the Deno Deploy platform.test.jsuses Deno to make full duplexfetchcalls into Workers to help test the four functions mentioned above with help of an echo server deployed at midway.fly.dev:5001.
Instructions:
# after git clone
# globally install wrangler, if needed
npm i wrangler@3 -g
# setup wrangler, as needed
# developers.cloudflare.com/workers/wrangler/install-and-update/
wrangler deploy
# edit ./test.js to point to your workers.dev and deno-deploy url
# install deno deno.com/manual/getting_started/installation, then:
./test.js
# test the echo server
echo "hello" | nc midway.fly.dev 5001This proxy is deployed to production at https://ken.rethinkdns.com/ for anti-censorship and anti-surveillance
purposes by the Rethink Open Source Project.