I’m not allowed to have a 4+ inch knife on campus, but I do it anyway. No one sees it. Yeahhhhh I’d say, if you can’t even have pepper spray, learn martial arts. Not the bullshit kind where you copy a sensei all day. Do MMA or something else that involved regular sparring practice. Something that will let you learn your own limits and grow.
Also, know how to avoid danger in the first place. Studies show that rapists target vulnerable people and those they do not expect to fight back or get them in trouble. Walk confidently, be aware of surroundings, stand your ground, have and enforce boundaries, refrain from excessive apologizing, stay in shape (they target people who clearly are not), do not show fear. If all else fails, emotional manipulation is a last line of defense. If you can get them to see you as human, they may stop.