Either bundle with SOCKS and rely on it, or configure port forwards via appropriate negotiations on the fly.