Skip to content

ezeql/oabdns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

oabdns

A DNS server that serves Bitcoin prices via TXT records

# 1. Build it
go build -o oabdns

# 2. Start the server
DNS_LISTEN=":8053" ./oabdns

# 3. Query Bitcoin price via DNS (in another terminal)
dig @127.0.0.1 -p 8053 TXT btc.local +short
# Output: "BTC/USD 116702.93 (src=coinbase, t=2025-09-18T02:21:13Z)"

That's it! You just queried Bitcoin price through DNS.

Configuration

# Custom domain (only answers for this name)
DNS_NAME="btc.example." ./oabdns

# Faster refresh, longer cache
REFRESH_EVERY=10s DNS_TTL=60 ./oabdns

# Production mode (requires sudo)
DNS_LISTEN=":53" sudo ./oabdns

Test Queries

# Basic price query
dig @127.0.0.1 -p 8053 TXT btc.local +short

# Any domain works (when DNS_NAME not set)
dig @127.0.0.1 -p 8053 TXT bitcoin.example.com +short
dig @127.0.0.1 -p 8053 TXT price.test +short

# Non-TXT queries return empty (as expected)
dig @127.0.0.1 -p 8053 A btc.local +short

"This could theoretically work on certain airlines without paying for WiFi... if they allow DNS queries but block HTTP. Just saying. Not that I'd ever try to get free Bitcoin prices at 30,000 feet. That would be... unethical. But hypothetically, if you set your DNS to a server running this, you might just get your crypto fix without the $15 internet fee. Allegedly."

Disclaimer: This is a joke. Please don't actually try to hack airline WiFi. Pay for internet like a responsible adult.

About

Bitcoin price served through DNS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages