Layer the vegetables in a bowl with the salt, cover with a plate and weight down, then leave to soak overnight.
Pour the vinegar into a saucepan and add the sugar, caraway seeds, coriander seeds and peppercorns, then the dried chillies, garlic and 3 stems of dill or fennel. Bring to the boil, stirring until the sugar has dissolved, then set aside for the flavours to mingle.
Next day, drain off the liquid from the vegetables, rinse with cold water, drain well, then pat dry with kitchen paper. Pack into warm, dry jars with the halved garlic and chillies from the vinegar mixture and the remaining fresh dill or fennel. Discard the cooked herbs from the spiced vinegar, then pour the cold vinegar mixture into the jars to the very top of the jars, making sure that the vegetables are completely covered (there is no need to strain the vinegar first).
Secure the lids, label and leave to mature in a cool, dark place for 3–4 weeks.