mirror of
https://github.com/nostr-protocol/nips.git
synced 2025-02-23 13:49:00 +00:00
extend 56.md
This commit is contained in:
parent
a83542b658
commit
40de29cd6f
88
56.md
88
56.md
@ -91,3 +91,91 @@ Relay behavior
|
|||||||
It is not recommended that relays perform automatic moderation using reports,
|
It is not recommended that relays perform automatic moderation using reports,
|
||||||
as they can be easily gamed. Admins could use reports from trusted moderators to
|
as they can be easily gamed. Admins could use reports from trusted moderators to
|
||||||
takedown illegal or explicit content if the relay does not allow such things.
|
takedown illegal or explicit content if the relay does not allow such things.
|
||||||
|
|
||||||
|
Domain Protection and Link Safety
|
||||||
|
=======================================
|
||||||
|
|
||||||
|
This extension to NIP-56 defines standards for domain protection and link safety in Nostr clients.
|
||||||
|
|
||||||
|
Motivation
|
||||||
|
----------
|
||||||
|
To protect users from potentially malicious links and unwanted content while maintaining the decentralized nature of Nostr.
|
||||||
|
|
||||||
|
Specification
|
||||||
|
------------
|
||||||
|
|
||||||
|
### Domain List Event
|
||||||
|
|
||||||
|
A kind `10099` replaceable event for storing user domain preferences:
|
||||||
|
|
||||||
|
```jsonc
|
||||||
|
{
|
||||||
|
"kind": 10099,
|
||||||
|
"content": "",
|
||||||
|
"tags": [
|
||||||
|
["d", "domain_lists"], // identifier
|
||||||
|
["white", "nostr.build"],
|
||||||
|
["white", "void.cat"],
|
||||||
|
["black", "malicious-site.net"],
|
||||||
|
["black", "scam-domain.com"]
|
||||||
|
["unknown", "ask"] // Options: "load" | "block" | "ask"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Report Event Extension
|
||||||
|
|
||||||
|
Extend kind `1984` events to include domain reporting:
|
||||||
|
|
||||||
|
```jsonc
|
||||||
|
{
|
||||||
|
"kind": 1984,
|
||||||
|
"tags": [
|
||||||
|
["u", "https://malicious-site.net", "malware"],
|
||||||
|
["L", "security.domain.safety"],
|
||||||
|
["l", "NS-mal", "security.domain.safety"]
|
||||||
|
],
|
||||||
|
"content": "Domain distributes malware",
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Additional Report Types
|
||||||
|
----------------------
|
||||||
|
Add the following report types for domains:
|
||||||
|
- `ip_grab` - Sites attempting to collect IP addresses
|
||||||
|
- `redirect` - Unexpected redirects to other domains
|
||||||
|
- `nsfw_content` - Adult or explicit content
|
||||||
|
- `phishing` - Fraudulent sites imitating legitimate services
|
||||||
|
|
||||||
|
Client Implementation
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
### Domain List Management
|
||||||
|
1. Clients MUST store user domain preferences in kind `10099` events
|
||||||
|
2. Clients SHOULD provide UI for managing white/blacklisted domains
|
||||||
|
3. Clients MAY implement an "ask" list for domains requiring user approval
|
||||||
|
|
||||||
|
### Link Processing
|
||||||
|
1. Clients MUST check all links against user domain lists
|
||||||
|
2. For whitelisted domains:
|
||||||
|
- Load content automatically
|
||||||
|
- Display domain safety indicator
|
||||||
|
3. For blacklisted domains:
|
||||||
|
- Display link as plain text only
|
||||||
|
- Show warning about blocked status
|
||||||
|
- Provide override option with clear warning
|
||||||
|
4. For unknown domains:
|
||||||
|
- Display link with neutral indicator
|
||||||
|
- Optionally require user confirmation before loading
|
||||||
|
- Provide quick actions to add to white/blacklist
|
||||||
|
|
||||||
|
### Report Aggregation
|
||||||
|
1. Clients SHOULD track domain report counts from followed users
|
||||||
|
2. Clients MAY use report thresholds to suggest domain blocking
|
||||||
|
3. Clients SHOULD cache domain reports for performance
|
||||||
|
|
||||||
|
Relay Behavior
|
||||||
|
-------------
|
||||||
|
1. Relays SHOULD accept and store kind `10099` events
|
||||||
|
2. Relays MAY maintain aggregated domain report statistics
|
||||||
|
3. Relays MUST NOT automatically block domains based on reports
|
||||||
|
Loading…
Reference in New Issue
Block a user