Class: HTTPX::Plugins::Authentication::Socks5
- Inherits:
-
Object
- Object
- HTTPX::Plugins::Authentication::Socks5
- Defined in:
- lib/httpx/plugins/auth/socks5.rb,
sig/plugins/auth/socks5.rbs
Instance Method Summary collapse
Instance Method Details
#authenticate ⇒ String
16 17 18 |
# File 'lib/httpx/plugins/auth/socks5.rb', line 16 def authenticate(*) [0x01, @user.bytesize, @user, @password.bytesize, @password].pack("CCA*CA*") end |
#can_authenticate? ⇒ Boolean
12 13 14 |
# File 'lib/httpx/plugins/auth/socks5.rb', line 12 def can_authenticate?(*) @user && @password end |