Now, China has become a major part of the solution. Already a giant in mask manufacturing, it has ramped up production to nearly 12 times its earlier level of 10 million a day. It was a huge mobilization effort that involved redesigning freight train routes and sending large numbers of workers across the country in sealed buses.

The Chinese government has encouraged global deals, but buying and selling masks is no easy feat. Traders, some just weeks into their unstable careers, have to navigate confusion, fraud attempts, byzantine customs laws and other barriers.

Many say they sell directly to hospitals and others who need the equipment, not to speculators. Altruism aside, hospitals are also less likely to default on payments and more likely to know precisely what is in demand.

“It becomes so much easier when you deal with the procurement professionals, because they know exactly what they need,” said Blake Noah, a private banking art consultant who now arranges mask shipments in Shanghai.

Some factories make products of suspect quality, and some sellers will even try to swindle buyers. Last Thursday, a court in the Chinese city of Shaoxing sentenced a man to over 10 years in prison for repeatedly selling what looked like a cargo of masks but had only tree branches inside.

Mask traders in Shanghai say they have wasted time bargaining over rumored caches of masks before concluding that the only reliable suppliers are top managers at the factories themselves.

“I’m still being put in touch with people who claim to have caches of 3M-branded masks,” Mr. Noah said. “But I’m skeptical such caches exist after looking at four or five phantom caches.”