> An N95 is the opposite. It only filters on the way in.
Only if they have a valve. Masks with valves are usually considered inappropriate for covid.
All valveless masks, including N95, surgical and cloth masks protect both ways, there is no difference between the front and the back of the filtering material. Some masks are better than others, but none are one-way unless there is a one-way valve.
That's also a reason why they recommend N95 and not N99. Most N99 masks have valves (can be uncomfortable without them) and are therefore inappropriate. These are mostly to protect construction workers from harmful dust.