Local network tool that transparently redirects all X/Twitter traffic to xcancel.com, allowing you to browse Twitter content without directly accessing X's servers.
Local network tool that transparently redirects all X/Twitter traffic to xcancel.com, allowing you to browse Twitter content without directly accessing X’s servers.
xcancel.com is a privacy-respecting Twitter/X frontend that lets you view tweets, threads, and profiles without tracking, ads, or algorithm manipulation. It’s similar to Nitter but remains actively maintained as of 2025.
This setup intercepts X/Twitter traffic using DNS override + reverse proxy:
┌─────────────┐ DNS Query ┌──────────────┐
│ Your Device │─────twitter.com?────────▶│ DNS Server │
│ │ │ (Pi-hole/ │
│ │◀────nginx IP (local)─────│ dnsmasq) │
└─────────────┘ └──────────────┘
│
│ HTTP Request to twitter.com
│ (goes to nginx IP instead)
▼
┌─────────────┐
│ nginx │─────301 Redirect────────▶ xcancel.com
│ Container │ (loads content)
│ (local) │
└─────────────┘
What happens:
Why? View tweets shared in links while avoiding tracking and supporting privacy-respecting alternatives.
Interactive browser tool that:
Time: 10-15 minutes • Difficulty: Easy
python3 scripts/setup-wizard.py
Command-line wizard that:
Time: 5-10 minutes • Difficulty: Medium
Follow the detailed guides to understand each component:
Time: 20-30 minutes • Difficulty: Medium-Hard
Not sure which? See Decision Guide for help choosing setup options.
For those who want to understand each step:
# 1. Clone and configure
git clone https://github.com/ryantenney/xcancel-forwarder.git
cd xcancel-forwarder
cp .env.example .env
# Edit .env with your network settings
# 2. Set up SSL certificates (optional but recommended)
brew install mkcert
mkcert -install
mkcert twitter.com x.com "*.twitter.com" "*.x.com" t.co "*.t.co"
# Place certificates in nginx/ssl/
# 3. Start nginx
docker compose up -d
# 4. Configure DNS (choose one):
# - Pi-hole: Add DNS records in web UI
# - dnsmasq: Uncomment in docker-compose.yaml
# - Router: Add static DNS entries
# See docs/ for detailed instructions
# 5. Test
curl -I http://twitter.com # Should show 301 to xcancel.com
Full details: See docs/QUICKSTART.md
See SSL Setup Guide or Advanced SSL
See Decision Guide to choose
See docker-compose.yaml comments for setup
.
├── setup-wizard.html # Web-based setup wizard
├── docker-compose.yaml # nginx configuration
├── docker-compose.caddy.yaml # Caddy alternative
├── .env.example # Environment template
├── nginx/
│ ├── conf.d/
│ │ └── xcancel-redirect.conf # Redirect rules
│ └── ssl/ # Place certificates here
├── caddy/
│ ├── Caddyfile # Caddy config (simpler)
│ └── ssl/ # Caddy certificates
├── dnsmasq/
│ └── dnsmasq.conf # Optional DNS server
├── docs/ # Detailed guides
└── scripts/
├── setup-wizard.py # CLI wizard
└── test-redirect.sh # Quick test
# Check DNS resolution
nslookup twitter.com # Should return nginx IP
# Test HTTP redirect
curl -I http://twitter.com # Should show 301
# Test HTTPS redirect (if SSL configured)
curl -I https://twitter.com
# Test in browser
# Visit twitter.com - should redirect to xcancel.com
Detailed testing: See docs/TESTING.md
# Check DNS
nslookup twitter.com # Should return nginx IP
# Check nginx is running
docker compose ps
# View logs
docker compose logs nginx
Full troubleshooting: See docs/TESTING.md
# Start services
docker compose up -d
# View logs
docker compose logs -f nginx
# Restart
docker compose restart
# Stop
docker compose down
# Update
docker compose pull && docker compose up -d
Complete reference: See docs/QUICK_REFERENCE.md
Getting Started:
Configuration:
Testing & Troubleshooting:
Installing a self-signed CA as trusted means your device will trust any certificate signed by that CA. Keep the CA private key secure and only install on devices you control.
This setup only intercepts domains you explicitly configure. It cannot intercept other domains without adding them to DNS, nginx config, and SSL certificate.
See Security Considerations for details.
Issues and pull requests welcome at https://github.com/ryantenney/xcancel-forwarder
MIT License - see LICENSE