Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tcdowney/web-monetization-proxy
Simple Go proxy for injecting Web Monetization meta tags. Done as part of the Dev "Grant For The Web" Hackathon
https://github.com/tcdowney/web-monetization-proxy
gftwhackathon go golang proxy web-monetization
Last synced: 11 days ago
JSON representation
Simple Go proxy for injecting Web Monetization meta tags. Done as part of the Dev "Grant For The Web" Hackathon
- Host: GitHub
- URL: https://github.com/tcdowney/web-monetization-proxy
- Owner: tcdowney
- License: mit
- Created: 2020-05-10T22:22:49.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2020-08-11T14:25:51.000Z (over 4 years ago)
- Last Synced: 2024-11-08T23:09:18.608Z (2 months ago)
- Topics: gftwhackathon, go, golang, proxy, web-monetization
- Language: Go
- Size: 351 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-web-monetization - web-monetization-proxy - Simple Go proxy for injecting Web Monetization meta tags. ![](assets/small_icons/go.png) (Resources / Packages)
README
[![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/downey/web-monetization-proxy)](https://hub.docker.com/repository/docker/downey/web-monetization-proxy) [![Docker Image Version (latest by date)](https://img.shields.io/docker/v/downey/web-monetization-proxy)](https://hub.docker.com/repository/docker/downey/web-monetization-proxy)
# web-monetization-proxy
Docker repo: https://hub.docker.com/repository/docker/downey/web-monetization-proxySimple proxy for injecting [Web Monetization](https://webmonetization.org/) `meta` tags. Intended to be deployed as a sidecar process alongside Web Monetization unaware webapps.
![Architecture diagram of the Web Monetization Proxy](doc/web-monetization-proxy.png)
## disclaimer
This **proof-of-concept** project was created for fun as part of the [DEV "Grant For The Web" Hackathon](https://dev.to/devteam/announcing-the-grant-for-the-web-hackathon-on-dev-3kd1). 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](https://github.com/envoyproxy/envoy-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](https://paymentpointers.org/) stringReference the [example Deployment](hack/example-deployment.yaml) to see how you might configure these in Kubernetes.
## development
This project uses [Go modules](https://blog.golang.org/using-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](doc/example-deployment-screenshot.png)This project uses [Cloud Native Buildpacks](https://buildpacks.io/) and the [`pack` cli](https://buildpacks.io/docs/install-pack/) in lieu of a `Dockerfile`. New images can be built by running the following:
```console
pack build -B cloudfoundry/cnb:bionic
```To ease development and deployment to Kubernetes, it also includes some [`kbld`](https://get-kbld.io/) configuration in the `build` directory and a sample Kubernetes `Deployment` in the `hack` directory.
To quickly build, push, and deploy to Kubernetes run1:
```console
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._