Safer Nostr is a service that helps protect users by loading sensitive information (IP leak) and using AI to prevent inappropriate images from being uploaded.

Overview

safer-nostr

Safer Nostr is a service that helps protect users by loading sensitive information (IP leak) and using AI to prevent inappropriate images from being uploaded. It also offers image optimization and storage options. It has configurable privacy and storage settings, as well as custom cache expiration.

Key features

  • Load NIP-05
  • Load website preview
  • Cache texts
    • Cache in Redis
    • Cache in RAM
  • Load and optimize Medias
    • Store in Redis
    • Store in RAM
    • Store in S3
    • Store in local disk
    • Artificial intelligence checks for inappropriate images
    • Artificial intelligence checks for inappropriate gifs
    • Artificial intelligence checks for inappropriate videos
  • Formats
    • JPG
    • PNG
    • GIF
    • MP4
    • WEBP
  • Configurable settings
    • Private or public mode
    • Private mode: Public key verification
    • Private mode: Password verification
    • RAM or Redis storage options
    • Custom cache expiration time
    • Bitcoin or Lightning Bitcoin payment 1 time or recurrent to be in the allowlist

API's

For server that requires authentication with public key

You can only make one authenticated request with the same signature.

Parameter Type Description Example Is required?
pubkey string Your public key 884704bd421721e292edbff42eb77547fe115c6ff9825b08fc366be4cd69e9f6 yes
uniq string a unique (random) string 20 yes
time number Unix timestamp (UTC-0) 1600000000 yes
sig string Signature of: sha256(string: "{pubkey}:{time}:{uniq}"") 0ae1feeb6fb36f3f5f5d3f001b06a5f6d01c999d7a74b9227012cdac0587f1ef7b9ed4b5e16afd3f1f502266f0b3b2ed21906554d6e4ffba43de2bb99d061694 yes
sig string pubkey 884704bd421721e292edbff42eb77547fe115c6ff9825b08fc366be4cd69e9f6 yes

For server that requires authentication with password

Parameter Type Description Example Is required?
pass string Your password helloworld yes

GET /is_good

Check if the server is ok with your password / sig / nothing

type IsGoodResponse = "Yes!" | "Access Denied";

GET /nip05

Example without Authentification required: https://example.com/[email protected] Example with password Authentification required: https://example.com/[email protected]&pass=helloworld Example with pubkey Authentification required: https://example.com/[email protected]&pubkey=884704bd421721e292edbff42eb77547fe115c6ff9825b08fc366be4cd69e9f6&uniq=20&time=1600000000&sig=0ae1feeb6fb36f3f5f5d3f001b06a5f6d01c999d7a74b9227012cdac0587f1ef7b9ed4b5e16afd3f1f502266f0b3b2ed21906554d6e4ffba43de2bb99d061694

Parameter Type Description Example Is required?
nip05 string NIP-05 to load [email protected] yes

Response type:

type NIP05Response = {
  status: "error";
  message: string;
} | {
  pubkey: string;
  status: "success";
  updated_at: number;
}

GET /image_proxy

Example without Authentification required: https://example.com/image_proxy?url=https://example.com/image.png&width=800&ratio=16:9 Example with Authentification required: https://example.com/image_proxy?url=https://example.com/image.png&width=800&ratio=16:9&pubkey=884704bd421721e292edbff42eb77547fe115c6ff9825b08fc366be4cd69e9f6&uniq=20&time=1600000000&sig=0ae1feeb6fb36f3f5f5d3f001b06a5f6d01c999d7a74b9227012cdac0587f1ef7b9ed4b5e16afd3f1f502266f0b3b2ed21906554d6e4ffba43de2bb99d061694

Parameter Type Description Example Is required?
url string URL of the image to load https://example.com/image.png yes
width number Width of the image 100 no
height number Height of the image 100 no
ratio string Ratio of the image 1:1 no

Response type: An image

GET /website_preview

Example without Authentification required: https://example.com/website_preview?url=https://example.com Example with Authentification required: https://example.com/website_preview?url=https://example.com&pubkey=884704bd421721e292edbff42eb77547fe115c6ff9825b08fc366be4cd69e9f6&uniq=20&time=1600000000&sig=0ae1feeb6fb36f3f5f5d3f001b06a5f6d01c999d7a74b9227012cdac0587f1ef7b9ed4b5e16afd3f1f502266f0b3b2ed21906554d6e4ffba43de2bb99d061694

Parameter Type Description Example Is required?
url string URL of the website to load https://example.com yes

Response type:

type WebsitePreviewResponse = {
  title: string;
  description: string;
  image: string;
}
You might also like...
Nostr CLI client built with Rust

Nostr CLI client built with Rust Encrypted chat inside Nostr leaks metadata of who talks to who. This small CLI app implements a "public inbox," which

A simple tool to mine nostr vanity pubkeys.

Nostr CPU pubkey miner A simple tool to mine nostr vanity pubkeys. Currently supports hexadecimal and bech32 vanity keys. Tested on Windows but should

A GPT-3 access point through Nostr, powered by lightning

Geppeto A Nostr based API for GPT-3, powered on Lightning. The bot listens for event kind 29000 (inspired by NIP-9000) and will query the prompt to th

This is an example Nostr rust project to enable '402 Payment Required' responses for requests to paid content.

Nostr Paywall Example This is an example Nostr rust project to enable 402 Payment Required responses for requests to paid content. To prove payment, a

siamstr.com Nostr Address Provider written in Rust.
siamstr.com Nostr Address Provider written in Rust.

Siamstr Nostr Address Provider Running project Rust Toolchain You'll need to use the nightly Rust toolchain, and install the wasm32-unknown-unknown ta

Simple console input macros with the goal of being implemented in the standard library.

Simple console input macros with the goal of being implemented in the standard library.

A simple crate, that protects some variables from being modified by memory tampering tools.

Crate: protected_integer A simple crate, that protects some variables from being modified by memory tampering tools. Usage Add this crate to dependenc

being Ariel's best friend!
being Ariel's best friend!

Sebastian se·bas·tian - sɪˈbæstɪən A simple tool used to access UniMi services -- mainly ariel, but not only -- via CLI. Important: state First of all

Umpteen is a general-purpose programming language currently in active development being bootstrapped from Rust

The Umpteen Programming Language This repository provides the reference implementation for the Umpteen Programming Language, bootstrapped from Rust. U

Owner
Thomas
Tech Architect. • Working to make things better and simpler.
Thomas
To help prevent directory traversal attacks

safe_join Use SafeJoin::safe_join in place of Path::join to help prevent directory traversal attacks. A call of the form dir.safe_join(path) returns a

Trail of Bits 1 Dec 27, 2021
ripsecrets is a command-line tool to prevent committing secret keys into your source code.

ripsecrets is a command-line tool to prevent committing secret keys into your source code. ripsecrets has a few features that distinguish it from other secret scanning tools:

Brian Smith 588 Dec 30, 2022
Use your computer as a cosmic ray detector! One of the memory errors Rust does not protect against.

Your computer can double up as a cosmic ray detector. Yes, really! Cosmic rays hit your computer all the time. If they hit the RAM, this can sometimes

Johanna Sörngård 110 Jun 16, 2023
🚩 Show sensitive command summary when open a new terminal

?? Show sensitive command summary when open a new terminal ?? Clear sensitive commands from shell history ?? Stash your history command before present

Rusty Ferris Club 161 Dec 26, 2022
convert nostr keys and note-ids between hex and bech32

Key-Convertr People are copy-pasting nostr private keys into webpages to convert between the original hex-encoding and bech32-encoding (specified in N

Rijndael 14 Jan 9, 2023
Peakrs Dataframe is a library and framework facilitates the extraction, transformation, and loading (ETL) of data.

Peakrs Dataframe Peakrs Dataframe is a library and framework facilitates the extraction, transformation, and loading (ETL) of data. Its first applicat

Max Yu 5 Sep 6, 2023
A library for loading and executing PE (Portable Executable) from memory without ever touching the disk

memexec A library for loading and executing PE (Portable Executable) from memory without ever touching the disk This is my own version for specific pr

FssAy 5 Aug 27, 2022
A Rust 🦀️ font loading, positioning and rendering toolkit

Toolkit used to load, match, measure and render texts. NOTE: This project is a work in progress. Text measuring and positioning is a complex topic. A

Alibaba 63 Dec 27, 2022
Nostr protocol implementation, SDK and FFI

Searchnos: an experimental implementation of NIP-50 This is a relay-like bridge server that provides a Nostr full-text search capability by using Elas

SAGE 8 Jul 2, 2023
A fast nostr opengraph server, built on nostrdb and egui.

notecrumbs A nostr opengraph server build on nostrdb, egui, and skia. It renders notes using the CPU in around 50ms. Status WIP! Local note fetching w

Damus 7 Dec 21, 2023