def sort_ipv4_list(ip_list, unique=True):
    """
	Sorts a provided list of IPv4 addresses. Optionally can remove duplicate values
	Supports IPv4 addresses with ports included (ex: [10.11.12.13:80, 10.11.12.13:8080])

	:param ip_list: (list) iterable of IPv4 Addresses
	:param unique: (bool) removes duplicate values if true
	:return: sorted list of IP addresses
	"""
    if unique:
        ip_list = list(set(ip_list))
    return sorted(ip_list, key=lambda ip: (int(ip.split('.')[0]), int(ip.
        split('.')[1]), int(ip.split('.')[2]), int(ip.split('.')[3].split(
        ':')[0]), int(ip.split(':')[1]) if ':' in ip else 0))
