From 042d0bbec02f65495416aa6e8e2f882f98b2d81d Mon Sep 17 00:00:00 2001 From: Danny Morabito Date: Sun, 10 Aug 2025 21:36:06 +0200 Subject: [PATCH] fix --- README.md | 76 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 317d088..efc93ac 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,6 @@

NIP-42 Proxy

A simple, no-fuss NIP-42 authentication proxy for your Nostr relay.

- Docker Pulls - Bun License: AGPL v3

@@ -35,33 +33,38 @@ Ever wanted to run a private Nostr relay without all the hassle? This NIP-42 pro ### Let's Do This -1. **Clone the code:** +1. **Clone the code:** + ```bash git clone https://git.arx-ccn.com/Arx/nip42-proxy.git cd nip42-proxy ``` -2. **Install the things:** +2. **Install the things:** + ```bash bun install ``` -3. **Fire it up:** +3. **Fire it up:** + - **With Bun:** - * **With Bun:** - ```bash - RELAY_URL="wss://my-relay.com" ADMIN_PUBKEY="my-admin-pubkey" bun run index.ts - ``` + ```bash + RELAY_URL="wss://my-relay.com" ADMIN_PUBKEY="my-admin-pubkey" bun run index.ts + ``` - * **With Docker:** - 1. Build it: - ```bash - docker build -t nip42-proxy . - ``` - 2. Run it: - ```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 - ``` + - **With Docker:** + 1. Build it: + + ```bash + docker build -t nip42-proxy . + ``` + + 2. Run it: + + ```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 + ``` Now you can connect to your proxy with any Nostr client that gets NIP-42. @@ -72,18 +75,18 @@ This proxy is configured with environment variables. Here's the rundown:
Click to see all the options - | Variable | What it does | Default | - | ----------------------- | ---------------------------------------------------------------------------------------------- | --------- | - | `ALLOW_UNAUTHED_PUBLISH`| Let unauthenticated users publish events. | `false` | - | `RELAY_URL` | The URL of the relay you're proxying. | | - | `RELAY_OUTSIDE_URL` | The URL your users will connect to. | `RELAY_URL` | - | `RELAY_NAME` | The name of your relay. | | - | `RELAY_DESCRIPTION` | A little something about your relay. | | - | `RELAY_BANNER` | A URL for a banner image. | | - | `RELAY_ICON` | A URL for an icon. | | - | `RELAY_CONTACT` | How people can get in touch. | | - | `RELAY_POLICY` | A URL to your relay's policy. | | - | `ADMIN_PUBKEY` | The public key of the relay's admin. | | +| Variable | What it does | Default | +| ------------------------ | ----------------------------------------- | ----------- | +| `ALLOW_UNAUTHED_PUBLISH` | Let unauthenticated users publish events. | `false` | +| `RELAY_URL` | The URL of the relay you're proxying. | | +| `RELAY_OUTSIDE_URL` | The URL your users will connect to. | `RELAY_URL` | +| `RELAY_NAME` | The name of your relay. | | +| `RELAY_DESCRIPTION` | A little something about your relay. | | +| `RELAY_BANNER` | A URL for a banner image. | | +| `RELAY_ICON` | A URL for an icon. | | +| `RELAY_CONTACT` | How people can get in touch. | | +| `RELAY_POLICY` | A URL to your relay's policy. | | +| `ADMIN_PUBKEY` | The public key of the relay's admin. | |
@@ -104,11 +107,11 @@ The proxy has a special RPC interface for admins, protected by NIP-98. Just send ## 🤔 How's It Work? -1. **Knock Knock:** A client connects, but they're just a guest for now. -2. **Who's There?:** The proxy asks for their credentials with an `AUTH` challenge. -3. **The Password:** The client sends back a valid `AUTH` event, signed with a key that's on the list. -4. **You're In:** The client is now authenticated and can chat with the relay. -5. **The Conversation:** Messages flow freely between the client and the relay. +1. **Knock Knock:** A client connects, but they're just a guest for now. +2. **Who's There?:** The proxy asks for their credentials with an `AUTH` challenge. +3. **The Password:** The client sends back a valid `AUTH` event, signed with a key that's on the list. +4. **You're In:** The client is now authenticated and can chat with the relay. +5. **The Conversation:** Messages flow freely between the client and the relay. ## 🤝 Wanna Help? @@ -116,4 +119,5 @@ Got ideas? Found a bug? Pull requests and issues are always welcome. ## 📄 The Fine Print -This project is licensed under the AGPLv3. Check out the [LICENSE](LICENSE) file for the full text. \ No newline at end of file +This project is licensed under the AGPLv3. Check out the [LICENSE](LICENSE) file for the full text. +