…the British Indian government had just started making inroads to the Khyber Agency by extending it’s railway beyond Jamrud.
The Peshawar – Jamrud railway had already been constructed on which the “Flying Afridi” train service would make a trip once a day. This train service, part of the greater Kabul River Railway or the Loye Shilman railway project, was to be extended much deeper into the Khyber Agency. The initial survey by Captain Macdonald was to follow the upstream right banks of the River Kabul along the Loye Shilman territory till the village of Palosi on the Afghan border. Although less challenging, this route was scrapped due to political issues of the time with the then Amir of Afghanistan, Amir Habibullah Khan and also probably due to the sheer number of bends in the River along the route.
Source: The Frontier Clasp and its Railways, Omar Usman, Khyber.org, 2011-03-14
There is a map which shows the Kabul River railway.