1
0

force_sni.rb 202 B

1234567891011
  1. require 'net/protocol'
  2. class Net::Protocol
  3. module ForceSNI
  4. def ssl_socket_connect(*)
  5. @sock.hostname = @host if @sock.respond_to? :hostname=
  6. super
  7. end
  8. end
  9. prepend ForceSNI
  10. end