Created
April 9, 2019 23:14
-
-
Save knu/182ebf76c3c4c271787a4e8c059203e8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/protocol' | |
class Net::Protocol | |
module ForceSNI | |
def ssl_socket_connect(*) | |
@sock.hostname = @host if @sock.respond_to? :hostname= | |
super | |
end | |
end | |
prepend ForceSNI | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment