I lived in a town that allowed fireworks at Halloween. One year, my family and I took care of a neighbor's dog when they went out of town over Halloween. That dog was a golden retriever and the most gentle, easy going dog I have ever encountered. That is, until the fireworks and he went ballistic. We brought him inside to a bathroom that didn't have windows and thus, it was hard to hear what was going on outdoors. We just did our best to keep that dog calm.
We told the neighbors about how their dog could not tolerate the noise of the fireworks and advised them that they are best to stay home with their dog during Halloween or take their dog with them, providing where they go, there isn't any fireworks.
If I lived in an area where fireworks are allowed either on Halloween or New Year's, then perhaps the only choose would be is to be out of town - with my dogs - during that celebration. Or stay indoors with my dogs and try to keep them calm. Most dogs can't tolerate the noise of the fireworks and I really don't blame them. I have chosen to live in an area where fireworks are not allowed.