Add app.resolveProxy API, fixes #545.