I wear sports bikini briefs when cycling in regular clothes. Gives the boys support and holds everything in place and out of the way. A jockstrap would do the same, but I prefer the bikini briefs.
Off the bike I like the freedom of boxer shorts, and have ridden in boxers at times, but boxers allow the same problems you describe.