Given that [auth_smart_proxy](https://github.com/theforeman/foreman/blob/develop/app/controllers/concerns/foreman/controller/smart_proxy_auth.rb#L36) will be called by HostsController#facts it seems easiest to set `@proxy` there and then pass it to Host#importHostAndFacts as you're doing now. Either that or refactor auth_smart_proxy to have a method you can call to get the proxy and then pass that to importHostAndFacts.