# Azzamo PREMIUM relays (relay, us, asia) # # Only active premium members can write. The member list comes from the # Azzamo API with an expiry per member, and members are still checked against # the Azzamo pubkey and word blacklists. # # Build: cargo build --release --features remote,cloudflare # Run: NOTEGUARD_CONFIG=/etc/noteguard/premium.toml (see DEPLOY.md) # # The source URLs below are placeholders until the Azzamo API endpoints and # response shapes are confirmed. Accepted shapes are documented in the README # (section "Sources"). # blacklist runs before the gate so a blacklisted member gets the blacklist # message; the gate runs before content so strangers never reach the word # check or count towards IP bans. pipeline = ["protected_events", "kinds", "blacklist", "whitelist", "content", "ratelimit"] # --------------------------------------------------------------------------- # Remote lists. See noteguard-free.example.toml for how loading works. The # cache matters most here: with no list and no cache the gate rejects # everyone (see `unavailable` below). # --------------------------------------------------------------------------- [sources.premium] url = "https://api.azzamo.net/CHANGEME/premium" format = "pubkeys" token_env = "AZZAMO_API_TOKEN" reload_secs = 300 timeout_secs = 10 cache_path = "/var/lib/noteguard/premium.json" [sources.blacklist_pubkeys] url = "https://api.azzamo.net/CHANGEME/blacklist/pubkeys" format = "pubkeys" token_env = "AZZAMO_API_TOKEN" reload_secs = 300 timeout_secs = 10 cache_path = "/var/lib/noteguard/blacklist_pubkeys.json" [sources.blacklist_words] url = "https://api.azzamo.net/CHANGEME/blacklist/words" format = "words" token_env = "AZZAMO_API_TOKEN" reload_secs = 300 timeout_secs = 10 cache_path = "/var/lib/noteguard/blacklist_words.json" # --------------------------------------------------------------------------- # Filters, in pipeline order. # --------------------------------------------------------------------------- [filters.protected_events] [filters.kinds] kinds = [30065, 1064, 34550, 4550] [filters.kinds.messages] 30065 = "blocked: files on nostr is dumb" 1064 = "blocked: files on nostr is dumb" 34550 = "blocked: please use a dedicated relay for moderated communities" 4550 = "blocked: please use a dedicated relay for moderated communities" [filters.blacklist] pubkeys_source = "blacklist_pubkeys" # The premium gate. Static pubkeys and IPs are allowed too (e.g. localhost for # admin imports). Zap receipts (kind 9735) and NIP-17 gift wraps (kind 1059) # are signed by non-member keys, so they are rejected here like any stranger. [filters.whitelist] pubkey_sources = ["premium"] ips = ["127.0.0.1"] message = "restricted: this relay is for Azzamo premium members" # "reject" (default) fails closed when the premium list has never loaded and # there is no cache; "accept" lets everyone write until it loads. unavailable = "reject" unavailable_message = "restricted: membership list unavailable, try again shortly" [filters.content] filters = ["Damus Airdrop"] words_source = "blacklist_words" # A guard against runaway clients rather than a quota: everyone here is a # member, so there is no premium exemption and no IP ban. [filters.ratelimit] posts_per_minute = 60 whitelist = ["127.0.0.1"]