Is there a way to request for a firewall exception in .NET 6? (not only on Windows)

116 Views Asked by At

(I don't know much about macOS)

On Windows, when an application is going to listen to a port, it will add a firewall rule for itself, and a Windows Firewall permission dialog will be shown.
Is there a way to perform this via .NET API?
My application is not for Windows only, so it is better not to use COM or other Windows-only workarounds

0

There are 0 best solutions below