Don't challenge state authority if you are not prepared to fight, have reasonable chance of winning and are ready to pay the price of failure.
If you are US citizen, you are forced to comply with the laws. The fact that you host something in Germany, doesn't mean it is not under sanctions.
If you tomorrow move your repo from github to codeberg and write "moved here so my iranian friends can have access to my work" - well chances are no one will notice. But if the state by bad luck puts their crosshair on you - don't be surprised if the result is the same as the Aaron Swartz case.
I am not claiming that you are even wrong. Just that when you are playing russian roulette - don't act surprised if there is a bullet.