Electret
en.wikipedia.org
en.wikipedia.org
This is the huge difference between N95 masks and the cheapies.
'N95' is just a rating (roughly the same as 'FFP2' in Europe) concerning the rate of filtration.
Yes, it 'works as a protection from the outside', they block those particles they are rated to protect, which (by diameter of particle) includes the coronavirus.
Scarves and pieces of generic cloth or polyester sold as 'coronavirus mask' obviously do also protect from the outside, they're not somehow directional, it's just that they aren't particularly effective at relevant particle sizes, to put it in the extreme: they'll catch your sneezes. Of course they'll catch others' sneezes too, but usually people don't sneeze on your face, so it gets talked about as inside/outside as though direction matters.
The heck?? Why was I not exposed to this as a kid? (After searching awhile) Why does nobody make these for sale?
[1] https://en.wikipedia.org/wiki/Gravitational_shielding#Electr...