Mongodb shell TLS SNI error when connecting to Atlas Shared cluster through local tcp proxy


Trying to directly connect to a MongoDB Atlas Shared cluster (M2) using mongosh through local tcp proxy.

mongosh "mongodb://" --username %USERNAME% --tls --tlsAllowInvalidHostnames
Error message:
MongoServerSelectionError: no SNI name sent, make sure using a MongoDB 3.4+ driver/shell.

mongosh version is 1.5.0

It that possible to connect to and send SNI server name at the same time?