I'm using Ubuntu 24.04 Noble, main network interfaced is a ethernet called enx144fd7c333e3, another wifi interface is called wlp1s0; there is also a shadow-socks(socks5) proxy server running at 127.0.0.1 port 1080, which is working perfectly fine. I created a hotspot on wlp1s0, then I cleaned all current iptables by
sudo iptables -t nat -F PREROUTING
sudo iptables -t nat -F POSTROUTING
then I started NAT with sudo iptables -t nat -A POSTROUTING -o enx144fd7c333e3 -j MASQUERADE
Finally routed all the trafic from the hotspot to 127.0.0.1:1080 by
sudo iptables -t nat -A PREROUTING -i wlp1s0 -p tcp --dport 80 -j REDIRECT --to-ports 1080
sudo iptables -t nat -A PREROUTING -i wlp1s0 -p tcp --dport 443 -j REDIRECT --to-ports 1080
But now after I connect to the hotspot, every website I try to visit shows empty response. I tried the method in method1 and method2. Non of them worked.