POC: Add proxy as an alternative to Browser extension #20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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