I've been working with reverse proxies the last week and I think it would be useful to implement one here.
Via NGINX + OpenResty we can:
Modify the headers of the page (enabling inline scripts, or allowing to put it in an iframe, and much more that maybe can't be done with a simple browser extension)
Inject the dom3d.js script via body_filter_by_lua_file
Make the browser believe the page domain is actually the requested
Deploy somewhere and make these amazing 3D websites public :)
This PR also includes a Dockerfile to easily run it, and a fly.toml as an example on how to deploy it.
I've been working with reverse proxies the last week and I think it would be useful to implement one here.
Via NGINX + OpenResty we can:
dom3d.js
script viabody_filter_by_lua_file
This PR also includes a Dockerfile to easily run it, and a
fly.toml
as an example on how to deploy it.I've deployed one. Here are a few examples:
https://dom3d.fly.dev/p?uri=https://www.cacoos.com/ https://dom3d.fly.dev/p?uri=google.com
This is just a POC. If you think it could be useful, would love to add more docs.
Here you can setup locally:
docker build -t nginx-proxy -f proxy/Dockerfile .
(we need it to be from main directory so we have access to thedom3d.js
file)docker run -p 9000:80 -it nginx-proxy
(port 80 mapped to 9000)localhost:9000/p?uri=example.com
If you want to deploy, install the flyctl CLI and use
fly launch --dockerfile proxy/Dockerfile
Screenshots:
https://dom3d.fly.dev/p?uri=google.com