Do scriptures allow Hindus to marry foreigners, or non-Hindus of other races?
Inter-caste marriage has its restrictions, but what about interracial marriages?
No, the Dharma Shastras explicitly forbid Hindus from marrying foreigners, otherwise known as Mlecchas.
Here are some verses from the Atri Smriti that prohibit interracial marriages:
The purification for knowing [having sex with] a Mleccha woman consists in a Santapanam penance, or it is said, one may attain to purification by performing a Taptakrcchra penance.
If a person lives with a wife known [who has had sex with] by a Mleccha man, he becomes purified by bathing with the cloth on and drinking clarified butter.
By cohabiting [living with and having sex with], unknowingly, with the women of the Chandalas, Mlecchas ... one is purified by a Paraka.
But if one knows them willingly, and procreates children with them, then he is degraded to the same caste as them; there is no doubt about it, for that man is born as her son.
So it is actually a huge sin to marry foreigners, since one becomes degraded to the caste of Mleccha.
This answer explains some of the different types of penances for sins.
The other answer already talked about the Atri Smriti Sutras which said this but I also found these Sutras from the Manusmriti:
This is from Manusmriti Adhyay 3 Sutra 7:
Such families as—(1) that in which the sacred rites have been abandoned, (2) which is male-less, (3) which is devoid of the Veda, (4) members of which are woolly and subject to (5) piles, (6) phthisis, (7) dyspepsia, (8) epilepsy, (9) leucoderma, and (10) leprosy.—(7)
This is the Manubhashya by Medhatithi Ji:
‘Devoid of the Veda’—destitute of Vedic study.
This is from Manusmriti Adhyay 3 Sutra 9:
Nor one bearing the name of an asterism, or a tree, or a river; nob one having her hame after a low caste or a mountain; nor one named after a bird, a serpent or a slave; nor one with a name inspiring terror.—(9)
These are the Explanatory notes by Ganganath Jha Ji:
This verse is quoted in Vīramitrodaya (Saṃskāra, p. 732), where ‘ṛkṣa’ is explained as ‘asterism;’—and ‘antya’ as ‘mleccha;’—in Smṛtitattva (II, p. 149) to the same effect as the preceding verse;’—in Vīramitrodaya (Lakṣaṇa, p. 120), where ‘antya’ is explained as ‘antyaja,’ i.e., cāṇḍāla;—in Aparārka (p. 78) as indicating the unmarriageability of girls with the wrong type of names;—in Samkāramayūkha (p. 74);—in Saṃskāraratnamālā (p. 510), which explains ‘antya’ as bearing a Mleccha name;—in Smṛticandrikā(Saṃskāra, p. 201), which explains ‘ṛkṣa’ as ‘nakṣatra,’ ‘antya’ as ‘mleccha,’ and ‘bhīṣaṇā’ as terrifying;—and in Nṛsiṃhaprasāda (Saṃskāra, p. 50a).
हर हर महादेव जी ਹਰ ਹਰ ਮਹਾਦੇਵ ਜੀ जय जय सनातन धर्म ਜਯ ਜਯ ਸਨਾਤਨ ਧਰ੍ਰਮ