Embargoed.Net is ASP.NET middleware with a that blocks all requests from Russia and displays a pro-Ukraine message instead.
This is a port of Embargoed. The author also maintains a list of ports on Embargoed-list.
Here's the message that replaces all pages of your app:
Use Rider/Visual Studio or run the following command:
dotnet add package Embargoed.AspNetCore
More details found here: https://www.nuget.org/packages/Embargoed.AspNetCore/
In your Program.cs
file (using .Net 6.0 minimal API):
...
app.UseRussiaEmbargo();
...
That's it. Traffic from Russia is now blocked.