[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Simple Go proxy for injecting Web Monetization meta tags. Done as part of the Dev "Grant For The Web" Hackathon

License

Notifications You must be signed in to change notification settings

tcdowney/web-monetization-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Image Size (latest by date) Docker Image Version (latest by date)

web-monetization-proxy

Docker repo: https://hub.docker.com/repository/docker/downey/web-monetization-proxy

Simple proxy for injecting Web Monetization meta tags. Intended to be deployed as a sidecar process alongside Web Monetization unaware webapps.

Architecture diagram of the Web Monetization Proxy

disclaimer

This proof-of-concept project was created for fun as part of the DEV "Grant For The Web" Hackathon. It should not be relied on for production use cases and merely exists to demonstrate what is possible. In the future it might be worth exploring doing something similar using Envoy proxies and a WASM plugin that implements this functionality.

configuration

The proxy relies on the following environment variables:

  • PROXY_PORT -- the port the proxy listens on
  • BACKEND_PORT -- the port of the backend application that requests are forwarded to
  • PAYMENT_POINTER -- an Interledger Payment Pointer string

Reference the example Deployment to see how you might configure these in Kubernetes.

development

This project uses Go modules which work best with Golang 1.13+. To run the project's tests, run go test ./... from the root directory.

build and deployment

Architecture diagram of the Web Monetization Proxy

This project uses Cloud Native Buildpacks and the pack cli in lieu of a Dockerfile. New images can be built by running the following:

pack build <image-name-here> -B cloudfoundry/cnb:bionic

To ease development and deployment to Kubernetes, it also includes some kbld configuration in the build directory and a sample Kubernetes Deployment in the hack directory.

To quickly build, push, and deploy to Kubernetes run1:

kbld -f hack -f build | kubectl apply -f -

1 - You will need to update build/destinations.yaml to refer to an OCI image registry you have permission to push to and replace hack/example-ingress.yaml with Ingress configuration that is valid for your cluster.

About

Simple Go proxy for injecting Web Monetization meta tags. Done as part of the Dev "Grant For The Web" Hackathon

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages