惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

I
InfoQ
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
B
Blog
罗磊的独立博客
GbyAI
GbyAI
博客园 - 三生石上(FineUI控件)
雷峰网
雷峰网
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Microsoft Security Blog
Microsoft Security Blog
宝玉的分享
宝玉的分享
The GitHub Blog
The GitHub Blog
人人都是产品经理
人人都是产品经理
博客园 - Franky
有赞技术团队
有赞技术团队
WordPress大学
WordPress大学
博客园 - 聂微东
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
V
Visual Studio Blog
MyScale Blog
MyScale Blog
Google DeepMind News
Google DeepMind News
G
Google Developers Blog
aimingoo的专栏
aimingoo的专栏

Show HN

GitHub - astefanutti/shaderbang: Shebang for Shaders Show HN: Generate Claude Code Workflows using Spec Driven Development approach Show HN: AI agents for UK GDAD PCF roles and their skills The Two Pillars: Mixer Mode and Meta-Software in the Reorganization of Software Work After AI GitHub - JaiCode08/teleport-env What 1,000+ Harness Experiments Taught Me About Self-Improving Agents Show HN: Liiists, a Markdown-first, iOS and CLI list app SwiperTab – Get this Extension for 🦊 Firefox (en-US) GitHub - kouhxp/fftext: Summarize, explain, fact-check, or translate any text, URL, or file. No GPU. No cloud. One command GitHub - sweetpad-dev/sweetpad: Develop Swift/iOS projects using VSCode GitHub - dogmaticdev/IRON: IRON a.k.a. Intermediate Representation Object Notation is a Interpreter/Database that is used to create Programming Languages. GitHub - sjhalani7/vaen: Package your AI coding harness into a portable .agent file, and share it across repos, teams, & the community without ever having to copy-paste instructions, skills, MCP config, or secrets. Show HN: Gandalf the Grader Show HN: Citadeld – replay any CI failure locally from a single file GitHub - tdortman/cuSBF: High-Performance GPU Super Bloom Filter coral-ai/claude-code-token-xray at main · Coral-Bricks-AI/coral-ai GitHub - ulyssestenn/funes: Funes is a Git-based framework for LLM-managed knowledge work: an AI Librarian ingests raw sources, builds an interlinked Markdown knowledge base, and uses it to produce cited reports, analyses, and other outputs. GitHub - ThatXliner/gah: Git Add Hunk, built for agents to use GitHub - harmont-dev/harmont-cli: Command-line client for the Harmont CI platform GitHub - brooksmcmillin/mcp-authflow: OAuth 2.0 Authorization Server framework for MCP servers GitHub - javaid-codes/audit-supply-chain-agents GitHub - amorey/gochan: A small library of common channel architectures for Go, inspired by Rust GitHub - arifozgun/OpenGem: Free, Open-Source AI API Gateway with Gemini, OpenAI & Anthropic Compatibility in 1 file GitHub - Pranesh950/BioPetals: 🌸 Run BIOxAI models at home, BitTorrent-style. Fine-tuning and inference up to 10x faster than offloading GitHub - cnguyen14/bounty-doctor: Diagnose a GitHub bounty issue before you waste hours: detects honeypot scam repos, AI-bot attempt swarms, and stale contests. Show HN: CoreMCP – MCP Server for On-Prem DBs Show HN: KittyHTML – Render HTML/CSS as an inline image in your terminal GitHub - bingud/filemat: Web-based file manager Show HN: TruthLens – Free multi-signal deepfake image detector GitHub - apexlocal-jz/claude-usage-tray: Windows system-tray app showing your Claude Code rate-limit usage at a glance. Zero deps, ~300 lines of PowerShell. Cross-IDE (works regardless of VS Code, Cursor, plain terminal).
GitHub - Wilfried-Tech/sidedns: SideDNS is a local DNS ro...
Wilfried-Tec · 2026-06-15 · via Show HN

Route any domain to any local service. Instantly. Without touching your system.

Platform CI Release Crates.io Crates.io Downloads docs.rs License

Stop editing /etc/hosts. Stop hardcoding ports. Stop breaking your DNS when you close the terminal.


What is SideDNS?

SideDNS is a local DNS router and transparent HTTP/HTTPS proxy for developers.
It lets you map any domain name to any local service — and undo it completely when you're done.

sidedns add api.myapp.com --port 3000
# → api.myapp.com now resolves to your local server, system-wide, instantly

sidedns daemon stop
# → everything reverts. no residue. your machine is exactly as you left it.

No permanent config changes. No manual cleanup. No broken DNS after a crash.


Why SideDNS?

Problem Common workaround SideDNS
Test a local API as api.prod.com Edit /etc/hosts manually sidedns add api.prod.com --port 3000
Multiple services with real domain names Per-app proxy configs One daemon, system-wide
HTTPS locally with a real certificate Self-sign manually, fight the browser sidedns cert install --trust + --https
Clean up when done Remember to undo everything sidedns daemon stop undoes everything
One command to launch + route Two terminals, manual wiring sidedns run -d api.local fastapi dev

Features

  • Transparent DNS routing — rules apply system-wide, to every app on the machine
  • HTTP & HTTPS proxy — TLS termination with on-demand signed certificates
  • WebSocket support — upgrades are tunneled transparently
  • Ephemeral rulessidedns run creates a rule for the lifetime of a command, then removes it
  • Wildcard domains*.myapp.local matches all subdomains
  • Auto port detectionsidedns run can detect which port your process opened
  • Daemon lifecycle — background process, PID-managed, graceful shutdown
  • Watch modesidedns watch streams rule changes in real time
  • Live event streamsidedns watch streams rule changes in real time
  • Safe by design — warns before routing public domains, sidedns clean removes any residue
  • Cross-platform — Windows, macOS, Linux

Architecture

┌───────────────────────────────────────────────────────┐
│                    sidedns daemon                     │
│                                                       │
│  ┌──────────────┐  ┌───────────────┐  ┌───────────┐   │
│  │  DNS Server  │  │  HTTP/HTTPS   │  │    IPC    │   │
│  │ 127.0.53.53  │  │  Proxy :80    │  │  Server   │   │
│  │    port 53   │  │  & :443       │  │           │   │
│  └──────┬───────┘  └──────┬────────┘  └─────┬─────┘   │
│         │                 │                 │         │
│         └─────────────────┴────────────────►│         │
│                                        SharedState    │
│                                        (RuleStore)    │
└───────────────────────────────────────────────────────┘
         ▲                                    ▲
         │ DNS queries                        │ IPC commands
    System DNS                          CLI / GUI
    (all apps)                    sidedns add / remove / ...

The daemon runs a DNS server, a reverse proxy, and an IPC server — all sharing the same rule store via a lock-free arc-swap structure. CLI and GUI communicate exclusively through IPC.

DNS returns the proxy IP (127.0.0.42), not the target service IP directly. This is necessary because DNS has no concept of ports — the proxy bridges the gap.

Rules are stored in a lock-free arc-swap structure. DNS and proxy reads never block, even during writes.

Ephemeral vs persistent rules

Persistent Ephemeral
Created by sidedns add sidedns run
Survives restart Yes No
Removed by sidedns remove Command exit / crash
Priority Normal Higher (shadows persistent rules)

Installation

cargo install

Pre-built binaries

Download the latest binary for your platform from the Releases page.

Platform File
Linux x86_64 (glibc) sidedns-vX.Y.Z-x86_64-unknown-linux-gnu.tar.gz
Linux x86_64 (musl) sidedns-vX.Y.Z-x86_64-unknown-linux-musl.tar.gz
Linux ARM64 sidedns-vX.Y.Z-aarch64-unknown-linux-gnu.tar.gz
macOS Intel sidedns-vX.Y.Z-x86_64-apple-darwin.tar.gz
macOS Apple Silicon sidedns-vX.Y.Z-aarch64-apple-darwin.tar.gz
Windows x86_64 sidedns-vX.Y.Z-x86_64-pc-windows-msvc.zip

Each archive includes a .sha256 checksum file.

From source

git clone https://github.com/Wilfried-Tech/sidedns
cd sidedns
cargo build --release

The sidedns binary is in target/release/.

Platform requirements

OS Required
Linux systemd-resolved or compatible
macOS macOS 12+
Windows Windows 10+ (PowerShell, admin for DNS config)

Quick Start

# 1. Start the daemon (background by default)
sidedns daemon start

# 2. Add a rule
sidedns add api.local --port 3000

# 3. Your service at localhost:3000 is now reachable at http://api.local
curl http://api.local/health

# 4. Done for the day
sidedns daemon stop

Command Reference

sidedns daemon

Manage the background daemon process.

sidedns daemon start            # start in background (default)
sidedns daemon start --no-background   # run in foreground (for debugging)
sidedns daemon stop             # graceful shutdown + revert DNS config

sidedns add

Add or replace a DNS routing rule.

sidedns add <domain> [options]

Options:
  -i, --ip <IP>      Target IP address  [default: 127.0.0.1]
  -p, --port <PORT>  Target port        [default: 80]
      --https        Enable HTTPS TLS proxy for this rule
# Basic HTTP rule
sidedns add api.local --port 3000

# With a specific IP
sidedns add db.internal --ip 192.168.1.10 --port 5432

# HTTPS with TLS termination (requires cert install)
sidedns add secure.local --port 4000 --https

# Wildcard — matches all subdomains
sidedns add "*.myapp.local" --port 8080

sidedns remove

Remove a routing rule.

sidedns list

List all active routing rules (persistent and ephemeral).

DOMAIN                    IP                 PORT          SECURE
api.local                 127.0.0.1          3000          no
secure.local              127.0.0.1          4000          yes
*.myapp.local             127.0.0.1          8080          no

sidedns resolve

Resolve a domain to its configured target.

sidedns resolve api.local
# → api.local → 127.0.0.1:3000

sidedns run

Run a command with an ephemeral DNS rule active for its lifetime.
The rule is created before the command starts and removed when it exits — even on crash.

sidedns run -d <domain> [--ip IP] [--port PORT] [--https] -- <command> [args...]
# Auto-detect port after launch
sidedns run -d api.local -- npm run dev

# Explicit port
sidedns run -d api.local --port 3000 -- cargo run

# HTTPS proxy
sidedns run -d secure.local --port 4000 --https -- python -m uvicorn app:app

# Works with any command
sidedns run -d backend.test --port 8080 -- ./my-server

Port auto-detection: if --port is omitted, SideDNS waits for your process to open a port and configures the rule automatically. If multiple ports are opened, it prompts you to choose.

sidedns status

Show whether the daemon is running and how many rules are active.

sidedns status
# daemon: running
# rules:  3

sidedns watch

Stream rule changes to stdout in real time. Useful for scripting or monitoring.

sidedns cert

Manage the root CA certificate used for HTTPS proxying.

# Generate the CA (if not already done) and install it
sidedns cert install

# Generate + install + trust in all stores (requires admin)
sidedns cert install --trust

# Trust in specific stores
sidedns cert trust --system
sidedns cert trust --nss        # Firefox + Chrome on Linux
sidedns cert trust --java       # Java keystore via keytool

# Remove from all trust stores
sidedns cert untrust

# Untrust in specific stores
sidedns cert untrust [--system | --nss | --java]

# Uninstall the CA files entirely
sidedns cert uninstall

sidedns clean

Remove any residual DNS configuration that may have been left behind by a previous crash or incomplete shutdown.

Run this if DNS resolution seems broken after an unexpected daemon termination.


HTTPS Support

SideDNS can terminate TLS for your local services, giving them a valid HTTPS certificate that browsers trust.

How it works

  1. SideDNS generates a local root CA and stores it in your data directory
  2. You install and trust it once with sidedns cert install --trust
  3. For each rule with --https, SideDNS signs a certificate on demand using that CA
  4. The HTTPS proxy listens on :443, terminates TLS, and forwards plain HTTP to your service
  5. Browsers see a valid certificate — no warnings

Setup

# Requires admin/sudo
sudo sidedns cert install --trust

Firefox users: Firefox uses its own certificate store, independent of the system.

# Trust in Firefox/Chrome (Linux, via certutil)
sudo sidedns cert trust --nss

Firefox manual trust (all platforms):
Settings → Privacy & Security → View Certificates → Authorities → Import → select the CA file
The CA file is at the path shown by sidedns cert install.

Supported trust stores

Store Tool used Platforms
System security / certutil / distro tools macOS, Windows, Linux
NSS (Firefox, Chrome) certutil (libnss3-tools) Linux, macOS
Java keytool All (requires JDK)

Domain Safety

SideDNS accepts any valid domain name — there are no hard restrictions.

This is intentional: developers sometimes need to shadow real domains for integration testing, service mocking, or infrastructure simulation.

However, routing a real public domain (like api.stripe.com) through SideDNS means every application on your machine — not just your browser — will resolve that domain to your local service while the daemon is running. This includes CLI tools, package managers, background services, and anything else making network calls.

SideDNS surfaces a clear warning when you add a rule for a domain that appears to be a real public domain, and asks for explicit confirmation. For domains that are clearly local (.local, .test, .internal, .localhost, .example), no confirmation is required.

If the daemon stops unexpectedly, run sidedns clean to ensure no stale DNS configuration remains.


Platform Support

DNS configuration strategy

SideDNS uses split DNS — it routes only the domains you configure through its local resolver, leaving all other DNS traffic untouched. This makes it compatible with VPNs and other DNS tools running simultaneously.

Platform Mechanism Admin required
Linux systemd-resolved drop-in config Yes (for DNS config)
macOS /etc/resolver/<domain> files Yes (for DNS config)
Windows NRPT (Name Resolution Policy Table) Yes (for DNS config)

The daemon itself runs as a regular user process. Only the DNS system configuration step requires elevated privileges, performed at daemon start and reverted at daemon stop.

VPN compatibility

Because SideDNS uses split DNS (not global DNS replacement), it is compatible with most VPN setups. Your VPN's DNS configuration handles its own namespaces; SideDNS only intercepts the domains you explicitly configure.


How It Works Internally

DNS resolution flow

Application makes DNS query for "api.local"
    ↓
System DNS → split DNS routes "api.local" to SideDNS (127.0.53.53:53)
    ↓
SideDNS DNS server: rule found → returns 127.0.0.42 (proxy address)
SideDNS DNS server: no rule → forwards to upstream DNS (your real resolver)
    ↓
Application connects to 127.0.0.42:80 or :443
    ↓
SideDNS proxy: reads Host header → looks up rule → forwards to target ip:port

Rule store

Rules are stored in a lock-free arc-swap structure. Reads (DNS server, HTTP proxy) are non-blocking and never contend with writes. Writes (IPC add/remove) clone and atomically swap the rule set.

Persistent rules survive daemon restarts (stored via confy). Ephemeral rules (sidedns run) exist only in memory.


Contributing

PRs and issues welcome. The codebase is structured as a Cargo workspace:

sidedns/
├── core/       # daemon logic: DNS, proxy, IPC, certs, rule store
└── cli/        # CLI binary + command handlers

Run tests:

cargo test -p sidedns-core
cargo test -p sidedns-cli

See CONTRIBUTING.md.

Issues and PRs are welcome. Please open an issue before starting work on a significant feature.


License

MIT — see LICENSE.