Module: Proxied::Shared::InstanceMethods
- Defined in:
- lib/proxied/shared.rb
Instance Method Summary collapse
- #proxy_address(include_http: false) ⇒ Object
- #proxy_credentials ⇒ Object
- #proxy_options_for_faraday ⇒ Object
- #socks_proxy_credentials ⇒ Object
Instance Method Details
#proxy_address(include_http: false) ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/proxied/shared.rb', line 26 def proxy_address(include_http: false) case self.auth_mode.to_sym when :credentials ::Proxied::Utilities.format_proxy_address(host: self.host, port: self.port, include_http: include_http) when :basic_auth ::Proxied::Utilities.format_proxy_address(host: self.host, port: self.port, username: self.username, password: self.password, include_http: include_http) end end |
#proxy_credentials ⇒ Object
35 36 37 |
# File 'lib/proxied/shared.rb', line 35 def proxy_credentials ::Proxied::Utilities.format_proxy_credentials(self.username, self.password) end |
#proxy_options_for_faraday ⇒ Object
43 44 45 |
# File 'lib/proxied/shared.rb', line 43 def ::Proxied::Utilities.(host: self.host, port: self.port, username: self.username, password: self.password, auth_mode: self.auth_mode) end |
#socks_proxy_credentials ⇒ Object
39 40 41 |
# File 'lib/proxied/shared.rb', line 39 def socks_proxy_credentials ::Proxied::Utilities.socks_proxy_credentials(username: self.username, password: self.password) end |