Khelif needs to sue the IBA, as it's their tests that have caused the outrage.
It's an outrage which is justified if the tests are correct, because men with DSDs shouldn't be participating in women's sports, even if they were misidentified as female at birth. But, conversely, if the tests are inaccurate, then the IBA have caused a woman to be harassed and accused of being male when she's not.
People shouldn't be punished for saying that Khelif (or Lin Yu-ting) shouldn't be in women's sports when a major sporting body has publicly said that they're ineligible due to their sex. Rather than going after those people, Khelif needs to go after the IBA. Maybe she could... I dunno, do a new test to clear things up and prove them wrong?