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.
Symptom-based troubleshooting quick reference
Find your symptom below for quick diagnosis and solutions. For detailed testing procedures, see TESTING.md.
Start here if nothing is working:
docker compose psnslookup twitter.comcurl http://NGINX_IP90% of issues are DNS cache - clear everything and try again.
Connection Issues:
DNS Issues:
SSL/Certificate Issues:
Container Issues:
Network Issues:
Redirect Issues:
Symptom: Visiting twitter.com loads actual Twitter, not xcancel.
# 1. Clear ALL caches
# DNS server cache
pihole restartdns # OR
docker compose restart dnsmasq
# 2. Client DNS cache
# macOS:
sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder
# Windows:
ipconfig /flushdns
# Linux:
sudo systemd-resolve --flush-caches
# 3. Browser cache
# Chrome: chrome://net-internals/#dns → Clear host cache
# Or use incognito/private mode
# 4. Test
nslookup twitter.com
# Should return your nginx IP, not 104.244.42.x
DNS not configured:
nslookup twitter.com DNS_SERVER_IPdnsmasq/dnsmasq.conf has address=/twitter.com/NGINX_IPDevice using wrong DNS:
# Check what DNS you're using
cat /etc/resolv.conf # Linux/macOS
ipconfig /all # Windows
DNS cache:
Symptom: curl http://NGINX_IP returns “Connection refused” or times out.
# 1. Check nginx is running
docker compose ps
# Should show nginx Up
# 2. Check nginx logs
docker compose logs nginx
# Look for errors
# 3. Verify nginx is listening
docker compose exec nginx netstat -tlnp | grep -E ':(80|443)'
# Should show nginx listening on ports 80 and 443
# 4. Restart nginx
docker compose restart nginx
nginx not running:
docker compose up -d nginx
Wrong IP:
.env for NGINX_IPFirewall blocking:
# Check firewall
sudo iptables -L -n | grep -E '(80|443)'
# Allow ports (if needed)
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
Port already in use:
# Check what's using port 80/443
sudo netstat -tlnp | grep -E ':(80|443)'
# Stop conflicting service or use different ports
Symptom: nslookup twitter.com returns 104.244.42.x (Twitter’s real IP) instead of your nginx IP.
# 1. Test DNS server directly
nslookup twitter.com YOUR_DNS_IP
# Should return nginx IP
# 2. If wrong, check DNS config
# Pi-hole: Web UI → Local DNS → DNS Records
# dnsmasq: cat dnsmasq/dnsmasq.conf
# Router: Check static DNS entries
# 3. Restart DNS server
pihole restartdns # OR
docker compose restart dnsmasq
DNS override not configured:
twitter.com → NGINX_IPaddress=/twitter.com/NGINX_IPNGINX_IP twitter.comClient not using your DNS:
# Check DNS server setting
cat /etc/resolv.conf
# Should list your DNS server IP
# If wrong, configure device DNS:
# - Per-device: Network settings
# - Network-wide: Router DHCP settings
Using upstream DNS directly:
Symptom: “Your connection is not private” or “NET::ERR_CERT_AUTHORITY_INVALID” when visiting https://twitter.com.
Option 1: Install CA certificate (recommended):
ca.crt as trusted root certificateOption 2: Skip SSL (HTTP only):
# Edit nginx/conf.d/xcancel-redirect.conf
# Comment out SSL-related lines (3, 5, 9, 13-18, 20-21)
docker compose restart nginx
# Now only http://twitter.com works (no warnings)
CA not installed:
Wrong certificate:
# Check what certificate nginx is serving
openssl s_client -connect twitter.com:443 -servername twitter.com </dev/null | openssl x509 -noout -text
# Verify:
# - Subject CN matches domain
# - Subject Alternative Names includes twitter.com, x.com, t.co
# - Issuer is your CA
Certificate expired:
# Check expiry
openssl x509 -in nginx/ssl/server.crt -noout -dates
# If expired, regenerate:
# mkcert: Re-run mkcert command
# OpenSSL: Create new certificate
Symptom: Redirect works on laptop but not phone, or works in Firefox but not Chrome.
For each failing device:
# 1. Check DNS
nslookup twitter.com
# Should return nginx IP
# 2. Clear caches
# Device DNS cache (see OS-specific commands above)
# Browser cache (incognito mode or clear cache)
# 3. Check DNS server setting
# Should point to your DNS server, not 8.8.8.8 or 1.1.1.1
Device using wrong DNS:
SSL certificate not installed on device:
Device has stale cache:
Browser using DoH (DNS over HTTPS):
Symptom: docker compose ps shows container as “Exited” or not running.
# 1. Check logs
docker compose logs nginx
# 2. Common issues
# SSL files missing:
ls nginx/ssl/
# Should have server.crt and server.key
# Config syntax error:
docker compose exec nginx nginx -t
# Port already in use:
sudo netstat -tlnp | grep -E ':(80|443)'
# Fix issue, then restart:
docker compose up -d
SSL certificate files missing:
# Check files exist
ls -la nginx/ssl/
# Should have:
# - server.crt (certificate)
# - server.key (private key)
# If missing, generate certificates:
# See SSL_SETUP_MKCERT.md or SSL_SETUP.md
Invalid nginx configuration:
# Test config
docker compose exec nginx nginx -t
# If errors, check:
# - nginx/conf.d/xcancel-redirect.conf syntax
# - Certificate paths correct
Port conflict:
# Check if port in use
sudo netstat -tlnp | grep :80
# Solutions:
# - Stop conflicting service
# - Use different ports in docker-compose.yaml
# - Use macvlan networking (no port mapping)
Macvlan IP conflict:
# Check IP not in use
ping NGINX_IP
# Should timeout (IP free)
# If responds, IP is in use
# Choose different IP in .env
Symptom: nslookup twitter.com shows nginx IP, but browser loads actual Twitter.
# 1. Clear browser DNS cache
# Chrome: chrome://net-internals/#dns → Clear host cache
# Firefox: about:networking#dns → Clear DNS Cache
# Safari: Quit and reopen
# 2. Try incognito/private mode
# 3. Check browser DNS settings
# Chrome/Edge: Settings → Privacy → Security
# Disable "Use secure DNS" (DNS over HTTPS)
Browser DNS cache:
Browser using DNS over HTTPS (DoH):
HSTS preload list:
Symptom: dnsmasq container exits immediately or shows error.
# 1. Check logs
docker compose logs dnsmasq
# 2. Common issues
# Port 53 in use:
sudo netstat -tulnp | grep :53
# Another DNS server running?
# IP conflict:
ping DNSMASQ_IP
# Should timeout
# Macvlan not configured:
docker network ls | grep macvlan
# 3. Fix and restart
docker compose up -d dnsmasq
Port 53 already in use:
# Check what's using port 53
sudo netstat -tulnp | grep :53
# Common culprits:
# - systemd-resolved (Ubuntu)
# - Another dnsmasq instance
# - Pi-hole on same host
# Solution: Stop conflicting service or use different host
IP address conflict:
.env → DNSMASQ_IPMacvlan not enabled:
docker-compose.yaml - macvlan section uncommenteddocker network lsMissing NET_ADMIN capability:
docker-compose.yaml has cap_add: - NET_ADMINSymptom: curl http://NGINX_IP fails from Docker host but works from other devices.
Docker limitation: Host cannot directly reach macvlan containers.
Test from another device on your network:
# From laptop/phone
curl http://NGINX_IP
# Should work
If you need host access:
# Route through router
curl http://NGINX_IP --interface eth0
Verification:
Symptom: Redirect takes several seconds instead of instant.
# 1. Test redirect time
time curl -s -o /dev/null http://twitter.com
# Should be < 0.1s on local network
# 2. Check DNS resolution
time nslookup twitter.com
# Should be < 0.01s
# 3. Check nginx response
time curl -s -o /dev/null http://NGINX_IP
# Should be < 0.05s
DNS slow:
Network issues:
ping NGINX_IP to check latencyContainer resources:
docker stats xcancel-nginx xcancel-dnsmasq
# Check CPU/memory usage
# Should be minimal (< 5% CPU, < 50MB RAM)
Symptom: Redirect happens instantly but xcancel.com takes long to load.
The redirect is instant (< 100ms). Content loading is xcancel.com’s performance.
Test redirect speed:
time curl -s -o /dev/null http://twitter.com
# Your redirect time (should be < 0.1s)
# Content from xcancel is separate
curl -s -o /dev/null https://xcancel.com
# This is xcancel's speed, not yours
Wait: xcancel.com may be temporarily slow
Switch frontend: Change redirect URL in nginx config to different Twitter frontend
Check xcancel status: Visit https://xcancel.com directly from another device
Symptom: Redirect returns 404 Not Found or unexpected page.
# 1. Check nginx config
cat nginx/conf.d/xcancel-redirect.conf
# Verify server_name includes domain:
# server_name twitter.com www.twitter.com x.com ...
# 2. Test config
docker compose exec nginx nginx -t
# 3. Restart nginx
docker compose restart nginx
Domain not in server_name:
nginx/conf.d/xcancel-redirect.confserver_name directivedocker compose restart nginxWrong nginx config loaded:
/etc/nginx/conf.d/ in containerAccessing wrong server:
# Clear ALL caches
pihole restartdns # OR docker compose restart dnsmasq
sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder # macOS
ipconfig /flushdns # Windows
sudo systemd-resolve --flush-caches # Linux
# Clear browser cache
# Chrome: chrome://net-internals/#dns → Clear
# Or use incognito mode
# Is DNS working?
nslookup twitter.com
# Should return nginx IP
# Is nginx working?
curl -I http://NGINX_IP
# Should return 301
# Are containers running?
docker compose ps
# Should show Up/healthy
# What's in the logs?
docker compose logs nginx
docker compose logs dnsmasq
docker compose downdocker compose up -dIf you’re still stuck:
docker compose logs