{"id":50583076,"url":"https://github.com/zoreu/proxyssl","last_synced_at":"2026-06-05T04:01:33.720Z","repository":{"id":314003045,"uuid":"1053760597","full_name":"zoreu/proxyssl","owner":"zoreu","description":"proxy ssl update","archived":false,"fork":false,"pushed_at":"2026-05-30T04:04:40.000Z","size":791,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-30T06:11:12.798Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zoreu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-09T22:30:20.000Z","updated_at":"2026-05-30T04:04:43.000Z","dependencies_parsed_at":"2026-01-07T19:10:31.453Z","dependency_job_id":null,"html_url":"https://github.com/zoreu/proxyssl","commit_stats":null,"previous_names":["zoreu/proxyssl"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zoreu/proxyssl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoreu%2Fproxyssl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoreu%2Fproxyssl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoreu%2Fproxyssl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoreu%2Fproxyssl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zoreu","download_url":"https://codeload.github.com/zoreu/proxyssl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoreu%2Fproxyssl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33928631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-05T02:00:06.157Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-05T04:01:33.187Z","updated_at":"2026-06-05T04:01:33.715Z","avatar_url":"https://github.com/zoreu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# proxyssl\nproxy ssl update\n\nproxy http ssl\n\n\n- **HTTP**\n\n```bash\nhttps://github.com/zoreu/proxyssl/raw/refs/heads/main/proxy_http_ssl.txt\n```\n\n# how to use on kodi\n\nproxy_http.py:\n```python\nimport requests\nimport random\nimport os\nimport sys\nimport json\nimport time\nimport logging\n\ntry:\n    from kodi_six import xbmc, xbmcplugin, xbmcgui, xbmcaddon, xbmcvfs\nexcept ImportError:\n    import xbmc\n    import xbmcplugin\n    import xbmcgui\n    import xbmcaddon\n    import xbmcvfs\n\nPY2 = sys.version_info[0] == 2\nADDON_ = xbmcaddon.Addon()\nTRANSLATE_ = xbmc.translatePath if PY2 else xbmcvfs.translatePath\nprofile = TRANSLATE_(ADDON_.getAddonInfo('profile'))\nif not os.path.exists(profile):\n    os.makedirs(profile)\n\nCACHE_FILE = os.path.join(profile, 'proxy_cache.json')\nlogging.basicConfig(level=logging.DEBUG)\n\nBASE_PROXIES_URL = 'https://raw.githubusercontent.com/zoreu/proxyssl/refs/heads/main/proxy_http_ssl.txt'\n\nclass ProxyScraper:\n    def __init__(self, cache_file=CACHE_FILE, cache_ttl=14400):\n        self.cache_file = cache_file\n        self.cache_ttl = cache_ttl\n        self.cache = self._load_cache()\n\n    def _load_cache(self):\n        \"\"\"Carrega o cache do arquivo JSON, removendo entradas expiradas.\"\"\"\n        try:\n            if os.path.exists(self.cache_file):\n                with open(self.cache_file, 'r') as f:\n                    cache = json.load(f)\n                current_time = time.time()\n                # Mantém apenas entradas não expiradas\n                valid_cache = {\n                    key: data for key, data in cache.items()\n                    if data['expires'] \u003e current_time\n                }\n                return valid_cache\n            return {}\n        except Exception as e:\n            logging.error(f\"Erro ao carregar cache: {e}\")\n            return {}\n\n    def _save_cache(self):\n        \"\"\"Salva o cache no arquivo JSON.\"\"\"\n        try:\n            with open(self.cache_file, 'w') as f:\n                json.dump(self.cache, f, indent=2)\n        except Exception as e:\n            logging.error(f\"Erro ao salvar cache: {e}\")\n\n    def _fetch_new_proxy(self):\n        \"\"\"Busca um proxy novo da lista online.\"\"\"\n        try:\n            response = requests.get(BASE_PROXIES_URL, headers={\n                'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36'\n            }, timeout=10)\n            if response.status_code == 200:\n                proxies = response.text.splitlines()\n                if proxies:\n                    selected = random.choice(proxies)\n                    proxy_auth = f\"http://{selected}\"\n                    return proxy_auth\n            logging.warning(\"Não foi possível obter proxies da lista online.\")\n        except Exception as e:\n            logging.error(f\"Erro ao buscar proxies: {e}\")\n        return None\n\n    def get_proxy(self, key=\"default\"):\n        \"\"\"Retorna um proxy do cache ou pega um novo se expirado.\"\"\"\n        current_time = time.time()\n        # Verifica cache\n        if key in self.cache:\n            cached = self.cache[key]\n            if cached['expires'] \u003e current_time:\n                logging.info(f\"Usando proxy do cache: {cached['proxy']}\")\n                return cached['proxy']\n            else:\n                logging.info(f\"Proxy expirado, removendo do cache: {cached['proxy']}\")\n                del self.cache[key]\n                self._save_cache()\n\n        # Busca novo proxy\n        new_proxy = self._fetch_new_proxy()\n        if new_proxy:\n            self.cache[key] = {\n                'proxy': new_proxy,\n                'expires': current_time + self.cache_ttl\n            }\n            self._save_cache()\n            logging.info(f\"Novo proxy salvo no cache: {new_proxy}\")\n            return new_proxy\n\n        logging.warning(\"Nenhum proxy disponível.\")\n        return None\n```\n\ndefault.py\n```python\nimport xbmc\nimport xbmcgui\nimport xbmcplugin\nimport xbmcaddon\nimport xbmcvfs\nimport requests\nADDON = xbmcaddon.Addon()\nPROXY_HTTP = ADDON.getSetting('proxy_http') or 'false'\nUSER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36'\nHEADERS = {'User-Agent': USER_AGENT}\ndef safe_requests_get(url, **kw):\n    kw.setdefault('headers', HEADERS)\n    kw.setdefault('timeout', 30)\n\n    # Se houver proxy definido, adiciona\n    if PROXY_HTTP == 'true':\n        scraper = ProxyScraper()\n        proxy = scraper.get_proxy()\n        if proxy:\n            kw.setdefault('proxies', {\n                \"http\": proxy,\n                \"https\": proxy\n            })\n\n    r = requests.get(url, **kw)\n    r.raise_for_status()\n    return r\n\nr = safe_requests_get('https://site_test.com')\nhtml = r.text\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoreu%2Fproxyssl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzoreu%2Fproxyssl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoreu%2Fproxyssl/lists"}