Permalink
Browse files

Merge pull request #7 from nferch/patch-1

[BUGFIX] Permit connections to IPv4 addresses
  • Loading branch information...
2 parents 530892c + f30d8e2 commit c2e32434ce72900d68abb626ff00be90f001bce6 @igrigorik committed Apr 15, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/em-socksify/socks5.rb
@@ -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)'

0 comments on commit c2e3243

Please sign in to comment.