### Sample `iptables` rules ``` # IPv4 sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8443 sudo iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 8443 # IPv6 sudo ip6tables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8443 sudo ip6tables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 8443 ``` ### Sample `dnsmasq` config ``` no-dhcp-interface= enable-tftp=false listen-address=0.0.0.0 interface=eth0 address=/#/185.218.139.254 server=/pool.ntp.org/1.1.1.1 server=/ntp.ubuntu.com/1.1.1.1 ``` ### Acknowledgements - [https://www.agwa.name/blog/post/writing_an_sni_proxy_in_go](https://www.agwa.name/blog/post/writing_an_sni_proxy_in_go) - [https://www.agwa.name/blog/post/writing_an_sni_proxy_in_go/media/sniproxy.go](https://www.agwa.name/blog/post/writing_an_sni_proxy_in_go/media/sniproxy.go)