I had a similar issue with my boy a few months back - he started lunging at every second car and making it very difficult to take him for walks.
We started off sitting by the road, and for every car that was coming our way, he gets a treat. Once you establish some positive association, only treat for cars that he doesn't lung at.
Me been a first time dog owner, didn't really know any better, so it took us a few weeks to get it under control, but our walks are manageable now, he gets fed on our walks. He now will signal me by making eye contact if there is a car that will make him 'tick', and I reward him whilst the car is driving pass. On the rare occasional, I see a loud truck coming (that I know he will lung at it) I will pull out a high value reward and put it in front of him and make him chose - can't eat and bark at the same time. And if it fails, I take away the reward and ignore him for a few moments before resuming our walk.
I reckon it may be quite a while before I completely stamp out the undesirable behaviors, but there have been significant improvements in his behavior. I hope this helps.
edit: for terrible spelling. Also to add the cars that make him 'tick' are the loud ones.