main: fix proxy initialization and setupCluster
Merge pull request #1372 from jonboulle/proxy

main: fix proxy initialization and setupCluster