"""socks-proxy.net / sslproxies.org 表格(README 参考 GetProxyFromSocks-proxy.py)。""" import re from typing import List from app.core.plugin_system import ProxyRaw from app.plugins.base import BaseHTTPPlugin from app.core.log import logger class FpwSocksSslProxyPlugin(BaseHTTPPlugin): name = "fpw_socks_ssl_proxy" display_name = "Socks-Proxy / SSLProxies" description = "socks-proxy.net 与 sslproxies.org 首页表格(HTTP/HTTPS 列表)" def __init__(self): super().__init__() self.max_concurrency = 4 # 与 sslproxies 同模板的镜像站较多,socks-proxy 在部分网络下不稳定,多源提高成功率 self.urls = [ "https://www.sslproxies.org/", "https://free-proxy-list.net/", "https://www.us-proxy.org/", "https://www.socks-proxy.net/", ] def _parse_page(self, html: str, default_protocol: str) -> List[ProxyRaw]: results = [] pattern = re.compile( r"(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\s*