I found a recipe for onion candies on a German website today, which made me think of this thread. Here it is, freely translated by me. In parentheses are my editorial comments
500 g (about a pound, a little over) brown sugar (I would use raw sugar, or experiment with honey)
2 Tbls. vinegar (I don't think it matters what kind; rice wine vinegar is relatively mild; ACV would be fine, but with the cooking it would lose much of its healthful properties))
2 Tbls water
100 g (about 3 oz) onion, very finely grated or chopped
1 Tbls butter
Melt the sugar in the water and vinegar over medium heat.
Mix in the onion, and, stirring constantly, cook until thickened and caramelized (be careful not to let it burn!)
Spread the butter over a cookie sheet, and pour the onion mixture onto it. Let it cool and harden a bit, and cut it into pieces (or spread it out thinly, and break it into pieces when cool)
When it is completely cool, spread the pieces out on a clean surface, and let them dry thoroughly.
"These bonbons are, like onion juice, an old time remedy against coughing and hoarseness. Children especially love them, as they also taste deliciously sweet."
There was some discussion, on the site where I found this, about how long these might last. Some said only for a few weeks; others said that, kept in a tightly closed jar, they should keep for longer. Final consensus was that only enough for the cold/cough season should probably be made at any one time. Though I would think that with that much sugar they would be perfectly fine for longer.