A student who feared he was going blind turned to dealing drugs to pay for private treatment, Exeter Crown Court has heard.
Lewis Rawlinson, 19, suffers from a progressive illness called Meibomian Eye Dysfunction and believed he could not be treated properly on the NHS.
He imported drugs bought online and was caught selling ecstasy and LSD at the Lockdown Festival, Devon, in September 2016.
He pleaded guilty to the charges.
Rawlinson previously admitted smuggling ecstasy (MDMA) and ketamine. He also admitted possession with intent to supply MDMA, LSD, diazepam, and alprozolam, plus possession of £2,250 criminal property, at Exeter Crown Court .
The teenager, of Pixie Walk, Ottery St Mary, spent more than £1,000 travelling from his home to specialist dry eye clinics in London and paying £500 on a Harley Street consultation, the court heard.
He has been detained at a young offenders institution for five-and-a-half years. Recorder Mr Andrew Maitland also ordered he forfeit the drugs and the £2,250.
Mr Jonathan Barnes, defending, said Rawlinson ordered the drugs on the internet without realising he was committing the very serious offence of smuggling them into Britain.