As Mr. Xi asserts himself and the primacy of Chinese geopolitical power, China has also become more comfortable projecting Mr. Xi’s vision of a tightly controlled internet. Beijing had long been content to block foreign internet companies and police the homegrown alternatives that sprouted up to take their place, but it is now directly pressuring individuals or requesting that companies cooperate with its online censorship efforts.

That puts many American tech giants in a tricky position, especially those that want access to China’s vast internet market of more than 700 million strong. In the past, these companies have typically gone to great lengths to gain a toehold in China. Facebook created a censorship tool it did not use and released an app in the country without putting its name to it. Apple is moving data storage for its Chinese customers into China and last year took down software that skirts China’s internet blocks from its China App Store. Google recently said it would open a new artificial intelligence lab in the country.

Often, these companies have little recourse when pressured for help by Beijing. Going to the American government could set off retaliation from China, so many have sought to navigate the situation on their own.

“I personally am not sure what the solution is for these companies,” said Mr. Rosenzweig. “I don’t see a good answer because the Chinese government is really putting them between a rock and a hard place.”

China leaned heavily on major internet companies when Guo Wengui, a Chinese tycoon in self-imposed exile, went on Facebook and YouTube to accuse a number of Chinese officials of corruption. Chinese officials last year complained to Google, which owns YouTube, and Facebook, according to people familiar with the events who requested anonymity because they were not authorized to discuss the issue publicly.

Facebook suspended Mr. Guo’s account. In a statement, the company said the account published the personal information of others without their consent, which violated the platform’s policies. A spokeswoman declined to comment on whether Beijing’s complaints played a role.