This commit is contained in:
Danny Morabito 2025-08-10 21:36:06 +02:00
parent 7ecc3a55e0
commit 042d0bbec0
Signed by: dannym
GPG key ID: 7CC8056A5A04557E

View file

@ -5,8 +5,6 @@
<h1>NIP-42 Proxy</h1> <h1>NIP-42 Proxy</h1>
<p>A simple, no-fuss NIP-42 authentication proxy for your Nostr relay.</p> <p>A simple, no-fuss NIP-42 authentication proxy for your Nostr relay.</p>
<p> <p>
<a href="https://hub.docker.com/r/your-docker-repo/nip42-proxy"><img src="https://img.shields.io/docker/pulls/your-docker-repo/nip42-proxy.svg" alt="Docker Pulls"></a>
<a href="https://www.bunity.com/"><img src="https://img.shields.io/badge/bun-%23FBF0DF.svg?style=for-the-badge&logo=bun&logoColor=black" alt="Bun"></a>
<a href="https://www.gnu.org/licenses/agpl-3.0"><img src="https://img.shields.io/badge/License-AGPL_v3-blue.svg" alt="License: AGPL v3"></a> <a href="https://www.gnu.org/licenses/agpl-3.0"><img src="https://img.shields.io/badge/License-AGPL_v3-blue.svg" alt="License: AGPL v3"></a>
</p> </p>
</td> </td>
@ -36,29 +34,34 @@ Ever wanted to run a private Nostr relay without all the hassle? This NIP-42 pro
### Let's Do This ### Let's Do This
1. **Clone the code:** 1. **Clone the code:**
```bash ```bash
git clone https://git.arx-ccn.com/Arx/nip42-proxy.git git clone https://git.arx-ccn.com/Arx/nip42-proxy.git
cd nip42-proxy cd nip42-proxy
``` ```
2. **Install the things:** 2. **Install the things:**
```bash ```bash
bun install bun install
``` ```
3. **Fire it up:** 3. **Fire it up:**
- **With Bun:**
* **With Bun:**
```bash ```bash
RELAY_URL="wss://my-relay.com" ADMIN_PUBKEY="my-admin-pubkey" bun run index.ts RELAY_URL="wss://my-relay.com" ADMIN_PUBKEY="my-admin-pubkey" bun run index.ts
``` ```
* **With Docker:** - **With Docker:**
1. Build it: 1. Build it:
```bash ```bash
docker build -t nip42-proxy . docker build -t nip42-proxy .
``` ```
2. Run it: 2. Run it:
```bash ```bash
docker run -p 3000:3000 -e RELAY_URL="wss://your-relay-url.com" -e ADMIN_PUBKEY="my-admin-pubkey" --name nip42-proxy nip42-proxy docker run -p 3000:3000 -e RELAY_URL="wss://your-relay-url.com" -e ADMIN_PUBKEY="my-admin-pubkey" --name nip42-proxy nip42-proxy
``` ```
@ -73,7 +76,7 @@ This proxy is configured with environment variables. Here's the rundown:
<summary>Click to see all the options</summary> <summary>Click to see all the options</summary>
| Variable | What it does | Default | | Variable | What it does | Default |
| ----------------------- | ---------------------------------------------------------------------------------------------- | --------- | | ------------------------ | ----------------------------------------- | ----------- |
| `ALLOW_UNAUTHED_PUBLISH` | Let unauthenticated users publish events. | `false` | | `ALLOW_UNAUTHED_PUBLISH` | Let unauthenticated users publish events. | `false` |
| `RELAY_URL` | The URL of the relay you're proxying. | | | `RELAY_URL` | The URL of the relay you're proxying. | |
| `RELAY_OUTSIDE_URL` | The URL your users will connect to. | `RELAY_URL` | | `RELAY_OUTSIDE_URL` | The URL your users will connect to. | `RELAY_URL` |
@ -117,3 +120,4 @@ Got ideas? Found a bug? Pull requests and issues are always welcome.
## 📄 The Fine Print ## 📄 The Fine Print
This project is licensed under the AGPLv3. Check out the [LICENSE](LICENSE) file for the full text. This project is licensed under the AGPLv3. Check out the [LICENSE](LICENSE) file for the full text.