Wash the jalapeños, remove the stalks and slice into rings approximately 5 mm thick. Wear gloves when preparing the chillies. If using additional hotter chillis, finely slice them.
Combine the sugar, vinegar, star anise, citrus peel, ginger and salt in a small saucepan. Heat gently, stirring until the sugar dissolves, then simmer uncovered for 3 minutes.
Add the jalapeños and optional hotter chilli. Return to a gentle simmer and cook for 4–5 minutes, stirring occasionally, until glossy and slightly softened but still holding their shape.
Transfer the peppers into a clean, warm, heatproof jar using a slotted spoon. Leave the star anise and citrus peel in the saucepan.
Simmer the syrup uncovered for 2–5 minutes, until it lightly coats a spoon but still pours freely. It will thicken as it cools.
Remove the star anise and citrus peel. Pour the syrup over the peppers to cover them, leaving a little space at the top.
Cool promptly, cover and refrigerate within two hours. Allow at least a week for the flavours to develop before serving.