Added an option to inject custom transport