Add option to select gateway manually. Closes #3505.