I think the Germans were the ones who started the Hun thing, using the label of themselves. Of course they have no biological relationship to the ancient Huns (other than that some Germanic tribes in the fifth century were subjects of the Huns).
I think Boche means swine.
From Wikipedia:
Term used in World War I, often collectively ("the Boche" meaning "the Germans"). From French slang alboche, from Allemand ("German") and caboche ("head" or "cabbage"). Also spelled "Bosch" or "Bosche".
I would say its close cousin is "Kraut". The Frogs also used to call the Limeys "Rosbifs", starting with the Napoleonic campaigns. The one thing they have in common is references to one type of food or another (if you consider amphibians food).
Nobody knows what “Boche” means but it’s clearly pretty bad.
Boche
Dictionary: Boche boche
also n. Offensive Slang.
Used as a disparaging term for a German.
[French, alteration of Alboche, blend of Allemand, German. See allemande, and French dialectal caboche, cabbage, blockhead; see cabbage.]