Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #7 from nferch/patch-1

[BUGFIX] Permit connections to IPv4 addresses
  • Loading branch information...
commit c2e32434ce72900d68abb626ff00be90f001bce6 2 parents 530892c + f30d8e2
Ilya Grigorik authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/em-socksify/socks5.rb
2  lib/em-socksify/socks5.rb
View
@@ -18,7 +18,7 @@ def socks_send_connect_request
send_data [5, 1, 0].pack('CCC')
if matches = @socks_target_host.match(/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/)
- send_data "\xF1\x00\x01" + matches.to_a[1 .. -1].map { |s| s.to_i }.pack('CCCC')
+ send_data "\x01" + matches.to_a[1 .. -1].map { |s| s.to_i }.pack('CCCC')
elsif @socks_target_host =~ /^[:0-9a-f]+$/
raise SOCKSError, 'TCP/IPv6 over SOCKS is not yet supported (inet_pton missing in Ruby & not supported by Tor)'
Please sign in to comment.
Something went wrong with that request. Please try again.