Look up iglu.net. They will employ you, in turn bill your foreign clients and take 30%, out of which they pay your Thai taxes and social security.
Note though you do NOT have to establish bonafide foreign tax residency to claim the FEIE from the IRS if you can satisfy the physical presence test, which just involves making sure you are in a country that is not the US for 330 full days per year.
**************************************************************************************************************