a nostr images proxy
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
alex 780b16cf5f
initial: api v1 draft
2 years ago
LICENSE initial: api v1 draft 2 years ago
README.md initial: api v1 draft 2 years ago

README.md

noxy is a nostr proxy

noxy receives a nostr event id, fetches images and link previews, and returns the result in a JSON object. the idea is to run such proxies to reduce IP address leaks and client fingerprinting.

API v1

there's a single endpoint accepting a nostr event id and relay to fetch the event from:

GET /api/v1/e/<event-id>?relay=<relay-uri>

some examples follow.

fetch a pubkey profile picture, event kind 0

request example:

GET /api/v1/e/e01ac1cfc5cb68b54183f878261b21ef30a65f5e06a24356cfe3ecdacce14bae?relay=wss%3A%2F%2Frelay.nostr.info

response:

{
  "images": {
    "https://git.qcode.ch/avatars/5a8071777eba7ebf178143fa650c8012?size=870": "https://noxy.example.org/abcdef/abcdef0123456789.png"
  }
}

event raw data →

if a noxy instance is unable to fetch the original, it responds with an empty object:

{
  "images": {}
}

fetch images from a text note, event kind 1

request example:

GET /api/v1/e/d822fdd220d8a74d2f025f331840eec8a640a663f1d3ca3de9f6a74ff0cc61fa?relay=wss%3A%2F%2Frelay.damus.io

response:

{
  "images": {
    "https://res.cloudinary.com/eskema/image/upload/v1668636521/osso_vt7qh7.png": "https://noxy.example.org/fedcba/fedcba9876543210.png"
  }
}

event raw data →

request example:

GET /api/v1/e/af30dac1d800acc25b87d0d6d0dd33bddf49e7f356556540a6c7722e3cb363fe?relay=wss%3A%2F%2Fnostr.x1ddos.ch%2F

response:

{
  "links": {
    "https://github.com/fiatjaf/noscl/pull/24": {
      "og:image": "https://opengraph.githubassets.com/dc27...92c8/fiatjaf/noscl/pull/24",
      "og:image:alt": "if the  arg to publish or message command is '-', it is read from stdin.\ncloses #19",
      "og:image:width": "1200",
      "og:image:height": "600",
      "og:site_name": "GitHub",
      "og:type": "object",
      "og:title": "publish,message: accept content from stdin by x1ddos · Pull Request #24 · fiatjaf/noscl",
      "og:description": "if the  arg to publish or message command is '-', it is read from stdin.\ncloses #19"
    }
  },
  "images": {
    "https://opengraph.githubassets.com/dc27...92c8/fiatjaf/noscl/pull/24": "https://noxy.example.org/beef01/beef0123456789.png"
  }
}

event raw data →