KAMPALA, Uganda — Outsiders have long profited from Africa’s riches of gold, diamonds and even people. Digital resources have proven no different. Millions of Internet addresses assigned to Africa have been waylaid, some fraudulently, in part through insider machinations linked to a former top employee of AFRINIC, the nonprofit that assigns the continent’s online addresses, an Associated Press investigation has found. Many have benefited spammers and scammers. Others are being used to serve Chinese appetites for pornography and gambling. The nonprofit’s new leadership is working to reclaim the lost addresses. But a legal challenge by a deep-pocketed Chinese businessman is...