Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/romis2012/tiny-proxy
SOCKS5/SOCKS4/HTTP proxy server
https://github.com/romis2012/tiny-proxy
anyio asyncio http proxy server socks socks4 socks5 trio
Last synced: about 2 months ago
JSON representation
SOCKS5/SOCKS4/HTTP proxy server
- Host: GitHub
- URL: https://github.com/romis2012/tiny-proxy
- Owner: romis2012
- License: apache-2.0
- Created: 2022-07-24T06:56:01.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-22T08:13:18.000Z (9 months ago)
- Last Synced: 2024-11-08T21:41:33.360Z (2 months ago)
- Topics: anyio, asyncio, http, proxy, server, socks, socks4, socks5, trio
- Language: Python
- Homepage:
- Size: 31.3 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
## tiny-proxy
[![CI](https://github.com/romis2012/tiny-proxy/actions/workflows/ci.yml/badge.svg)](https://github.com/romis2012/tiny-proxy/actions/workflows/ci.yml)
[![Coverage Status](https://codecov.io/gh/romis2012/tiny-proxy/branch/master/graph/badge.svg)](https://codecov.io/gh/romis2012/tiny-proxy)
[![PyPI version](https://badge.fury.io/py/tiny-proxy.svg)](https://pypi.python.org/pypi/tiny-proxy)Simple proxy (SOCKS4(a), SOCKS5(h), HTTP tunnel) server built with [anyio](https://github.com/agronholm/anyio).
It is used for testing [python-socks](https://github.com/romis2012/python-socks), [aiohttp-socks](https://github.com/romis2012/aiohttp-socks) and [httpx-socks](https://github.com/romis2012/httpx-socks) packages.## Requirements
- Python >= 3.7
- anyio>=3.6.1## Installation
```
pip install tiny-proxy
```## Usage
```python
import anyiofrom tiny_proxy import Socks5ProxyHandler
async def main():
handler = Socks5ProxyHandler(username='user', password='password')
listener = await anyio.create_tcp_listener(local_host='127.0.0.1', local_port=1080)
await listener.serve(handler.handle)if __name__ == '__main__':
anyio.run(main)
```