{"id":21215297,"url":"https://github.com/romis2012/aiohttp-socks","last_synced_at":"2025-05-14T23:07:33.507Z","repository":{"id":41335577,"uuid":"139717198","full_name":"romis2012/aiohttp-socks","owner":"romis2012","description":"Proxy (HTTP, SOCKS) connector  for aiohttp","archived":false,"fork":false,"pushed_at":"2024-12-26T07:05:11.000Z","size":1408,"stargazers_count":235,"open_issues_count":0,"forks_count":24,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-13T20:39:39.412Z","etag":null,"topics":["aiohttp","asyncio","http","proxy","python","socks4","socks5"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/romis2012.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2018-07-04T12:09:48.000Z","updated_at":"2025-04-06T11:39:29.000Z","dependencies_parsed_at":"2024-06-18T14:01:19.620Z","dependency_job_id":"c785d987-b4c7-48f0-8490-5413180b70c7","html_url":"https://github.com/romis2012/aiohttp-socks","commit_stats":{"total_commits":111,"total_committers":4,"mean_commits":27.75,"dds":0.04504504504504503,"last_synced_commit":"adb9bb0ff29ee965a329817c977148f175fbb91b"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romis2012%2Faiohttp-socks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romis2012%2Faiohttp-socks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romis2012%2Faiohttp-socks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romis2012%2Faiohttp-socks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/romis2012","download_url":"https://codeload.github.com/romis2012/aiohttp-socks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254130868,"owners_count":22019860,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["aiohttp","asyncio","http","proxy","python","socks4","socks5"],"created_at":"2024-11-20T21:36:42.574Z","updated_at":"2025-05-14T23:07:28.492Z","avatar_url":"https://github.com/romis2012.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## aiohttp-socks\n\n[![CI](https://github.com/romis2012/aiohttp-socks/actions/workflows/ci.yml/badge.svg)](https://github.com/romis2012/aiohttp-socks/actions/workflows/ci.yml)\n[![Coverage Status](https://codecov.io/gh/romis2012/aiohttp-socks/branch/master/graph/badge.svg)](https://codecov.io/gh/romis2012/aiohttp-socks)\n[![PyPI version](https://badge.fury.io/py/aiohttp-socks.svg)](https://pypi.python.org/pypi/aiohttp-socks)\n\u003c!--\n[![Downloads](https://pepy.tech/badge/aiohttp-socks/month)](https://pepy.tech/project/aiohttp-socks)\n--\u003e\nThe `aiohttp-socks` package provides a proxy connector for [aiohttp](https://github.com/aio-libs/aiohttp). \nSupports SOCKS4(a), SOCKS5(h), HTTP (tunneling) as well as Proxy chains.\nIt uses [python-socks](https://github.com/romis2012/python-socks) for core proxy functionality.\n\n\n## Requirements\n- Python \u003e= 3.8\n- aiohttp \u003e= 3.10.0\n- python-socks[asyncio] \u003e= 2.4.3\n\n## Installation\n```\npip install aiohttp_socks\n```\n\n## Usage\n\n#### aiohttp usage:\n```python\nimport aiohttp\nfrom aiohttp_socks import ProxyType, ProxyConnector, ChainProxyConnector\n\n\nasync def fetch(url):\n    connector = ProxyConnector.from_url('socks5://user:password@127.0.0.1:1080')\n    \n    ### or use ProxyConnector constructor\n    # connector = ProxyConnector(\n    #     proxy_type=ProxyType.SOCKS5,\n    #     host='127.0.0.1',\n    #     port=1080,\n    #     username='user',\n    #     password='password',\n    #     rdns=True # default is True for socks5\n    # )\n    \n    ### proxy chaining (since ver 0.3.3)\n    # connector = ChainProxyConnector.from_urls([\n    #     'socks5://user:password@127.0.0.1:1080',\n    #     'socks4://127.0.0.1:1081',\n    #     'http://user:password@127.0.0.1:3128',\n    # ])\n    async with aiohttp.ClientSession(connector=connector) as session:\n        async with session.get(url) as response:\n            return await response.text()\n```\n\n## Why yet another SOCKS connector for aiohttp\n\nUnlike [aiosocksy](https://github.com/romis2012/aiosocksy), aiohttp_socks has only single point of integration with aiohttp. \nThis makes it easier to maintain compatibility with new aiohttp versions.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromis2012%2Faiohttp-socks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromis2012%2Faiohttp-socks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromis2012%2Faiohttp-socks/lists"}