You don't need a @peer instance variable, the Msf::Exploit::Remote::HttpClient mixin provides a peer method, which returns just that