I found that I was easily able to do IRC over TLS over an SSH port-forward, but I expected it to fail because localhost != the name of the host in the server certificate.
https://github.com/flackr/circ/blob/master/package/bin/net/ssl_socket.js#L84 (and options always being {}) seems to show that the verify function will always return true. Docs for forge indicate this is where server name validation should happen (https://github.com/digitalbazaar/forge#options).
I haven't spent very long looking into this, I may be wrong. But it was surprising.