Hamza al-Aslami came to the Prophet ﷺ and said, "Messenger of Allah, I am a man who fasts continuously. Should I fast while traveling?"The Messenger of Allah ﷺ replied, "If you wish, fast, and if you wish, break your fast."
حدثنا أبو معاوية حدثنا هشام بن عروة عن أبيه
جاء حمزة الأسلمي إلى النبي ﷺ فقال يا رسول الله إني رجل أسرد الصوم أفأصوم في السفر قال فقال رسول الله ﷺ إن شئت فصم وإن شئت فأفطر
Its isnad is sahih. Bukhari narrated it, 4/179 no. 1943, Muslim, 2/790 no. 1121, Abu Dawud, 2/316 no. 2402, Tirmidhi, 3/82 no. 711, saying, hasan sahih, Nasai, 4/188 no. 2308, and Ibn Majah, 1/531 no. 1662, all of them in the chapter on fasting.