Module: Socksproxyable::ClassMethods
- Included in:
- TCPSocket
- Defined in:
- lib/socksify/socksproxyable.rb
Overview
class methods
Constant Summary collapse
- SOCKS4_VERSIONS =
%w[4 4a].freeze
Instance Attribute Summary collapse
-
#socks_password ⇒ Object
Returns the value of attribute socks_password.
-
#socks_port ⇒ Object
Returns the value of attribute socks_port.
-
#socks_server ⇒ Object
Returns the value of attribute socks_server.
-
#socks_username ⇒ Object
Returns the value of attribute socks_username.
Instance Method Summary collapse
- #socks_ignores ⇒ Object
- #socks_ignores=(*hosts) ⇒ Object
- #socks_version ⇒ Object
- #socks_version_hex ⇒ Object
Instance Attribute Details
#socks_password ⇒ Object
Returns the value of attribute socks_password.
9 10 11 |
# File 'lib/socksify/socksproxyable.rb', line 9 def socks_password @socks_password end |
#socks_port ⇒ Object
Returns the value of attribute socks_port.
9 10 11 |
# File 'lib/socksify/socksproxyable.rb', line 9 def socks_port @socks_port end |
#socks_server ⇒ Object
Returns the value of attribute socks_server.
9 10 11 |
# File 'lib/socksify/socksproxyable.rb', line 9 def socks_server @socks_server end |
#socks_username ⇒ Object
Returns the value of attribute socks_username.
9 10 11 |
# File 'lib/socksify/socksproxyable.rb', line 9 def socks_username @socks_username end |
Instance Method Details
#socks_ignores ⇒ Object
15 16 17 |
# File 'lib/socksify/socksproxyable.rb', line 15 def socks_ignores @socks_ignores ||= %w[localhost] end |
#socks_ignores=(*hosts) ⇒ Object
19 20 21 |
# File 'lib/socksify/socksproxyable.rb', line 19 def socks_ignores=(*hosts) @socks_ignores = hosts end |
#socks_version ⇒ Object
11 12 13 |
# File 'lib/socksify/socksproxyable.rb', line 11 def socks_version @socks_version ||= '5' end |
#socks_version_hex ⇒ Object
23 24 25 |
# File 'lib/socksify/socksproxyable.rb', line 23 def socks_version_hex SOCKS4_VERSIONS.include?(socks_version) ? "\004" : "\005" end |