hmm... what about https://github.com/isratrade/foreman/blob/3b67d082e4f8dfbd14a47ff5e41b66aaf155d641/app/models/smart_proxy.rb#L24