On podcasts and online videos, in interviews and twitter feeds, alt-right internet stars, white nationalists, libertarian activists and some of the biggest boosters of Mr. Trump heap praise on Ms. Gabbard. They like the Hawaiian congresswoman’s isolationist foreign policy views. They like her support for drug decriminalization. They like what she sees as censorship by big technology platforms.

Then there is 4chan, the notoriously toxic online message board, where some right-wing trolls and anti-Semites fawn over Ms. Gabbard, calling her “Mommy” and praising her willingness to criticize Israel. In April, the Daily Stormer, a neo-Nazi website, took credit for Ms. Gabbard’s qualification for the first two Democratic primary debates.

Brian Levin, the head of the Center for the Study of Hate and Extremism at California State University-San Bernardino, said Ms. Gabbard had “the seal of approval” within white nationalist circles. “If people have that isolationist worldview, there is one candidate that could best express them on each side: Gabbard on the Democratic side and Trump on the Republican side,” Mr. Levin said.