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.
Essential tests to verify your X/Twitter → xcancel redirect setup is working.
For advanced testing: See TESTING_ADVANCED.md for end-to-end testing, network-wide verification, monitoring, performance testing, and automated test scripts.
Before testing, ensure:
docker compose psUse the included test script for automated verification:
./scripts/test-redirect.sh
Or continue with manual tests below.
Verify containers are running properly:
# Check container status
docker compose ps
# Should show:
# NAME STATUS
# xcancel-nginx Up (healthy)
# xcancel-dnsmasq Up (if using dnsmasq)
# Check nginx logs
docker compose logs nginx
# Should show nginx started without errors
# Look for: "start worker processes"
nginx: [notice] start worker processes
nginx: [notice] ... worker process started
Container is “Up” but not “healthy”:
# Check health check logs
docker inspect xcancel-nginx | grep -A 10 Health
# Health check tests wget to localhost
# If failing, check nginx is actually listening
docker compose exec nginx netstat -tlnp
Container exits immediately:
# Check for config errors
docker compose logs nginx
# Common issues:
# - SSL certificate files missing
# - Invalid nginx configuration
# - Port already in use
Verify domains resolve to your nginx IP.
# Test twitter.com
nslookup twitter.com
# Expected output:
# Server: 192.168.1.1 (or your DNS server IP)
# Address: 192.168.1.1#53
#
# Name: twitter.com
# Address: 192.168.1.100 (your nginx IP)
# Test all domains
nslookup x.com
nslookup t.co
nslookup www.twitter.com
nslookup www.x.com
# Test twitter.com
dig twitter.com
# Look for ANSWER section:
# ;; ANSWER SECTION:
# twitter.com. 300 IN A 192.168.1.100
# Test specific DNS server
dig @192.168.1.101 twitter.com
host twitter.com
# Should return: twitter.com has address 192.168.1.100
Still returns real X IP (104.244.42.x):
“Non-authoritative answer” or caching issues:
# Clear local DNS cache (see below)
# Force fresh lookup
dig twitter.com +trace
Test the redirect without SSL:
# Test with curl
curl -I http://twitter.com
# Expected output:
# HTTP/1.1 301 Moved Permanently
# Location: https://xcancel.com/
# ...
# Test with a path
curl -I http://twitter.com/NASA
# Expected output:
# HTTP/1.1 301 Moved Permanently
# Location: https://xcancel.com/NASA
curl -I http://twitter.com
curl -I http://www.twitter.com
curl -I http://x.com
curl -I http://www.x.com
curl -I http://t.co
All should return 301 Moved Permanently to https://xcancel.com/.
Connection refused:
# Check nginx is listening on port 80
docker compose exec nginx netstat -tlnp | grep :80
# Test directly to nginx IP
curl -I http://192.168.1.100
404 or wrong response:
nginx/conf.d/xcancel-redirect.confserver_name includes the domainRedirect to wrong destination:
location / block in nginx configreturn 301 https://xcancel.com$request_uri;If you configured SSL certificates:
# Test HTTPS redirect
curl -I https://twitter.com
# Expected output:
# HTTP/2 301
# location: https://xcancel.com/
# ...
# Check certificate details
openssl s_client -connect twitter.com:443 -servername twitter.com < /dev/null
# Look for:
# - Issuer: Your CA
# - Subject: CN=twitter.com
# - Subject Alternative Names: twitter.com, x.com, etc.
# - Verify return code: 0 (ok)
Certificate not trusted (curl):
# Bypass verification (testing only)
curl -Ik https://twitter.com
# If this works, certificate is being served
# Issue is with trust/CA installation
Wrong certificate:
# Check what cert nginx is serving
openssl s_client -connect 192.168.1.100:443 < /dev/null | openssl x509 -text
# Verify Subject and SANs match
SSL handshake failure:
nginx/ssl/docker compose logs nginxMost important test - does it work in a real browser?
https://twitter.comhttps://xcancel.comxcancel.comVisit these URLs - all should redirect to xcancel:
https://twitter.com/NASAhttps://x.com/verifiedhttps://twitter.com/i/trendshttps://t.co/xxxxxxxxxx (any t.co short link)Repeat tests on mobile devices (iOS/Android):
https://twitter.comBrowser shows security warning:
Not redirecting:
Mixed results (works sometimes):
If tests aren’t working, clear caches. This solves 90% of issues.
Pi-hole:
pihole restartdns
dnsmasq (standalone):
docker compose restart dnsmasq
Router:
Restart router’s DNS service or reboot router.
Windows:
ipconfig /flushdns
macOS:
sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder
Linux:
# systemd-resolved
sudo systemd-resolve --flush-caches
# nscd
sudo service nscd restart
# dnsmasq (if running locally)
sudo systemctl restart dnsmasq
iOS:
Android:
Chrome/Edge:
chrome://net-internals/#dnsFirefox:
about:networking#dnsSafari:
If things aren’t working, check:
docker compose psnslookup twitter.comcurl http://192.168.1.100ls nginx/ssl/You’ll know it’s working when:
nslookup twitter.com returns your nginx IPcurl -I http://twitter.com returns 301 to xcancel.comOnce everything is working:
Install CA on other devices (if using SSL):
See SSL_SETUP_MKCERT.md for device-specific instructions.
Maintenance:
# View logs
docker compose logs -f nginx
# Update images
docker compose pull && docker compose up -d
# Restart services
docker compose restart
Set reminder: Certificate renewal in 825 days (OpenSSL) or when mkcert CA expires.
For more comprehensive testing, see: