Rewrite MongoDB URI to use tunnel endpoint and add directConnection=true when connecting through SSH, so the driver doesn't try to discover unreachable replica set members.
Rewrite MongoDB URI to use tunnel endpoint and add directConnection=true when connecting through SSH, so the driver doesn't try to discover unreachable replica set members.