It is narrated from Sayyiduna Ali (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) permitted wiping (over socks/leather socks) for three days and three nights for the traveler, and for one day and one night for the resident.