update docs
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@ This glossary defines key terms and concepts used throughout P2NS documentation.
|
||||
A decentralized DNS alternative that resolves domain names to IP addresses using peer-to-peer consensus rather than centralized DNS servers. Enables users to claim domains, share them across a P2P network, and resolve them locally.
|
||||
|
||||
### Domain Claim
|
||||
A record in the distributed ledger asserting ownership of a domain. Claims are stored as `claim:{domain}:{claimant}` entries containing the Holesail hash, timestamp, service clients, and SSL flag. Multiple peers can claim the same domain; consensus determines the winner.
|
||||
A record in the distributed ledger asserting ownership of a domain. Claims are stored as `claim:{domain}:{claimant}` entries containing the Holesail hash, timestamp, service clients, and SSL flag. Multiple peers can claim the same domain; consensus determines the winner. **Note: Internal domains (automatically discovered from `plugin-sites/{domain}/config.json` files) cannot be claimed and are reserved for local use only.**
|
||||
|
||||
### Vote
|
||||
A record supporting a specific domain claimant. Votes are stored as `vote:{domain}:{claimant}:{voter}` entries. Peers vote to support claims they trust, and consensus uses vote counts to resolve ownership disputes.
|
||||
|
||||
@@ -265,7 +265,7 @@ Access the admin interface at `https://p2ns.admin` and the peer directory at `ht
|
||||
|
||||
## Adding Domains
|
||||
|
||||
Domains are added as claims with Holesail hashes:
|
||||
Domains are added as claims with Holesail hashes. **Note: Internal domains (such as `p2ns.admin`, `peer.directory`, and any domains defined in `plugin-sites/{domain}/config.json`) cannot be claimed and are reserved for local use only.**
|
||||
|
||||
1. **Generate a Hash**:
|
||||
```bash
|
||||
|
||||
+1
-1
@@ -373,7 +373,7 @@ The P2NS (Peer-to-Peer Name System) admin backend API, hosted at `https://p2ns.a
|
||||
```
|
||||
|
||||
### 16. POST /api/add-domain
|
||||
- **Description**: Adds a domain with its Holesail hash to the P2P network and `domains.json`. Assigns an IP if needed and triggers auto-voting.
|
||||
- **Description**: Adds a domain with its Holesail hash to the P2P network and `domains.json`. Assigns an IP if needed and triggers auto-voting. **Note: Internal domains (automatically discovered from `plugin-sites/{domain}/config.json` files, including `p2ns.admin`) cannot be claimed and will return an error.**
|
||||
- **Request Body**: JSON with `domain` (string), `hash` (string, e.g., `hs://<hash>`), and optionally `ssl` (boolean). The `ssl` field indicates if the Holesail connection uses SSL/TLS. When `true`, proxy connections will use HTTPS/WSS instead of HTTP/WS. Defaults to `false` if not provided.
|
||||
- **Response**: Plain text `OK` on success, error message on failure.
|
||||
- **Status Codes**:
|
||||
|
||||
Reference in New Issue
Block a user