HTTPSのホスト名をごにょごにょする

curl:

curl \
 --resolve 'server.example.jp:8888:127.0.0.1' \
    https://server.example.jp:8888/

Ruby Net::HTTP:

ruby -r net/http -e '
  h = Net::HTTP.new("server.example.jp", 8888)
  def h.address; "localhost"; end
  h.use_ssl = true
  p h.get("/")
'

/etc/hostsに書き加えると消し忘れるのよ。

Net::HTTPのはアレかも。