In Vedic literature, Mitra and Varuna are two dieties (Devas) who are portrayed as icons of intimate friendship between males.
Mitra-Varuna are referred to in the ancient Indian scripture of the Rigveda.They are both considered Ādityas, or deities connected with the Sun; and they are protectors who preside over the universal waters. They are depicted riding a shark or crocodile together. Sometimes they are portrayed seated side-by-side on a golden chariot drawn by seven swans.
Ancient Brahmana texts associate Mitra and Varuna with the two lunar phases and same-sex relations:
(Shatapatha Brahmana 188.8.131.52)
“Mitra and Varuna are the two half-moons: the waxing one is Varuna and the waning one is Mitra. During the new-moon night these two meet and when they are thus together, everyone is pleased.
On that same night, Mitra implants his seed in Varuna and when the moon later wanes, that waning is produced from his seed. ( Varuna is similarly said to implant his seed in Mitra on the full-moon night for the purpose of securing its future waxing. In Hinduism, the new- and full-moon nights are discouraged times for procreation and consequently often associated with citrarata or unusual types of intercourse.
Bhagavata Purana (6.18.3) lists Varuna and Mitra as having children through non-vaginal sex. Varuna fathered the sage Valmiki when his semen fell upon a termite mound, and Agastya and Vasistha were born from water pots after Mitra and Varuna discharged their semen in the presence of Urvasi. This account is similar to Gay couples having children through surrogate mothers in modern days.
Source: Shatapatha Brahmana, Bhagwata Purana, Rigved, vedic literature.