"Foreign territory" to an extent and within very specific cases ( a US ran illegal detention center and US customs).
As a non-US citizen living in France, i have no rights under the US constitution because it has no jurisdiction over me. That doesn't stop the NSA though.
I wrote above to a similar example of extra-territorial government activities the US does but at least there can be domestic repercussions to such things (e.g. investigations, congressional hearings, etc.). I sincerely doubt such things happen in China. But as far as things like spying and the NSA in foreign countries... I think you're out of luck as is the rest of the world. Everyone is spying on everyone. I mean the Germans have been lambasting the US for doing so and then it broke recently they also bought from NSO Group! I would be shocked if the French weren't doing the exact same.
As a non-US citizen living in France, i have no rights under the US constitution because it has no jurisdiction over me. That doesn't stop the NSA though.