Using SSH with socks5 proxy as VPN

Couldn’t find a clear way to do it . Did anyone tried it ? Does openwrt support that even ? Does it also support pac files ?

Could someone explain to me step by step if it does support that .

Thank you !