As mentioned in T462, Whonix's socks redirection firewall rules size should be shrinked. Same rules. Less script code.
Code in question:
- https://github.com/Whonix/whonix-gw-firewall/blob/7f5f65f6bf682a7f7df1df37976b8733f933f239/usr/bin/whonix_firewall#L385-L412
- https://github.com/Whonix/whonix-gw-firewall/blob/7f5f65f6bf682a7f7df1df37976b8733f933f239/usr/bin/whonix_firewall#L435-L463
We can do firewall refactoring with virtually zero risk of changing actual rules by adhering the following instructions:
https://www.whonix.org/wiki/Dev/Firewall_Refactoring