DNSocial/README.md
2023-06-07 02:24:33 -07:00

69 lines
No EOL
1.6 KiB
Markdown

# DNSocial
DNSocial is a truly decentralized social media protocol that works by posting directly to DNS.
The protocol:
- Any domain or subdomain is a feed. Say `posts.example.com`
- Posts for that feed are TXT records for sequential subdomains starting from 1. eg. `1.posts.example.com`, `2.posts.example.com`
- To subscribe to a feed, continuously poll for the next integer subdomain until a TXT record is received.
## Usage
Get an API key and store it in plain text in a JSON file like
```json
{
"key": "KEY",
"secret": "SECRET"
}
```
post using the `dns_post` function:
```bash
dns_post -d posts.example.com -p "I am posting!"
```
Subscribe using the `dns_subscribe` function:
```bash
dns_subscribe -d posts.example.com
```
## API documentation
**`dns_post`**
```
usage: dns_post [-h] [-c CREDS] -d DOMAIN -p POST
Post to DNSocial
options:
-h, --help show this help message and exit
-c CREDS, --creds CREDS
Location of creds.json file (default is working directory)
-d DOMAIN, --domain DOMAIN
Domain to post to
-p POST, --post POST Your post!
```
**`dns_subscribe`**
```
usage: subscribe [-h] -d DOMAIN [-i INTERVAL]
Subscribe to a feed on DNS social
options:
-h, --help show this help message and exit
-d DOMAIN, --domain DOMAIN
Domain to post to
-i INTERVAL, --interval INTERVAL
Seconds between polling
```
## Limitations
Yeah it only works with the GoDaddy API, you think i am going to make an arbitrary DNS updating
library for a shitpost ya right be my guest.