Skip to content

Feature Request: Proxy List Update and Filtering #2

Description

@j0rd1s3rr4n0

Enhance Proxy List Management with External Source Replacement and Regex Filtering

Description:
Introduce a feature to facilitate the seamless update of proxy lists by replacing external sources and applying regex filtering to extract IP:Port combinations. This enhancement streamlines the process of working with proxy data, allowing users to easily integrate and manage proxy information in a cleaner and more efficient manner.

Example Usage:
Suppose you have a proxy list with additional information, such as country and region details. Utilizing the new feature, you can update and clean the list using a simple Python script:

import re

def update_and_filter_proxies(proxy_list):
    # Define a regular expression pattern to match IP:Port
    ip_port_pattern = re.compile(r'(\d+\.\d+\.\d+\.\d+:\d+)')
    
    # Update proxies and remove extra information
    updated_proxies = [re.search(ip_port_pattern, proxy).group(1) for proxy in proxy_list]
    
    return updated_proxies

# Example usage
proxy_list_with_linesplit = ['38.156.233.75:999|Dominican Republic|Nacional|Santo Domingo', '103.66.196.218:23500|Indonesia|West Kalimantan|Sungai Raya', ...]

updated_proxies = update_and_filter_proxies(proxy_list_with_linesplit)

print("Original Proxy List:")
print(proxy_list_with_linesplit)
print("\nUpdated Proxy List:")
print(updated_proxies)

In this example, update_and_filter_proxies function takes a proxy list as input, applies the specified updates, and returns a cleaned list containing only the IP:Port combinations. The result is a more manageable proxy list that can be easily integrated into various applications or systems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions