Is this allowed? Do the hindu texts speak anything about this? Can a person of one caste have friends who are of a different caste?
If we obey the directives of the scriptures, the upper castes can not mix freely with the lower castes. If they do, there are provisions of even cutting their body parts in the samhitas.
The well-known definition of friend is
utsave vyasane cha iva durvikshe rastra-viplave/rajadvaare smashaane cha yas tisthati sa bandhavah//
meaning : He is a friend, who stands (by one's side, in support) in celebration, in adversity, in calamity (like famine), during a scuffle with the enemy and in the royal court (of law?)/at the door of the king and in the funeral yard.
But lower castes are not allowed to go even to the burning ghat with brahmins, as per Manu-samhita (I quoted some such lines in one answer:Which smṛtis (dharma śāstras) are to be followed in Kali-yuga? ).
Also there are such restrictions as:
Manu Smriti 8.281-2 A low-caste man who tries to place himself on the same seat with a man of a high caste, shall be branded on his hip and be banished, or (the king) shall cause his buttock to be gashed.
Manu Smriti 5.104 Let him not allow a dead Brahmana to be carried out by a Sudra, while men of the same caste are at hand; for that burnt-offering which is defiled by a Sudra’s touch is detrimental to (the deceased’s passage to) heaven.
So I think it is clear our tradition does not allow making friend from any caste or creed.
Please remember I am not supporting this.I am just pointing to the injunctions.