i think the farangset explanation is the one that you hear most often, but if you look at the links at the bottom of the Wikipedia page there is a link to a page that points to many similarities in other languages, such as "barang" in Khmer, "farenghi" in Hindi, "afrangi" in Arabic etc. Surely not a coincidence?
the link is
The Thai word "Farang", its variations in other languages, and its Arabic origin | The Baheyeldin Dynasty