Metadata-Version: 2.5
Name: astralix-tl
Version: 1.0.0
Summary: This library is built for the astralix Userbot and is based on Telethon.
Project-URL: Homepage, https://astralix.cc
Project-URL: Source, https://git.astralix.cc/lowsense-dev/astralix-tl
Project-URL: Documentation, https://docs.telethon.dev
Project-URL: Reference, https://tl.telethon.dev
Author-email: Codrago <codrago@xyecoc.com>
Maintainer: LowSense
License-Expression: MIT
License-File: LICENSE.md
License-File: NOTICE.md
Keywords: api,chat,client,library,messaging,mtproto,telegram
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Communications :: Chat
Requires-Python: >=3.10
Requires-Dist: bs4==0.0.2
Requires-Dist: pyaes
Requires-Dist: rsa
Provides-Extra: cryptg
Requires-Dist: cryptg; extra == 'cryptg'
Description-Content-Type: text/markdown

# astralix-tl

Telegram MTProto client library for **astralix Userbot**, based on HerokuTL and Telethon.

Repository: https://git.astralix.cc/lowsense-dev/astralix-tl (public). No project Telegram channels or chats.

## Install from source

```bash
uv venv .venv
uv pip install --python .venv/bin/python .
```

The distribution is named `astralix-tl`; Python imports use `astralixtl`:

```python
from astralixtl import TelegramClient
```

The build generates Telegram types from the included schemas. Build a wheel with `uv build --wheel`.

## Security changes

This fork bounds packet lengths and gzip output, validates MTProto framing and DH responses with checks active under Python optimization, restricts web downloads to public HTTP(S) endpoints with TLS verification and size/time limits, hardens session-file permissions, and inspects renamed session uploads without optional dependencies.

These changes have regression tests in `tests/test_security.py`. They are a targeted review, not a guarantee that all vulnerabilities have been found. New DH primes and downloads above the configured limits require review. Live Telegram login has not been tested in this revision.

```bash
uv pip install --python .venv/bin/python aiohttp
.venv/bin/python -I -m unittest discover -s tests -v
.venv/bin/python -I -O -m unittest discover -s tests -v
```

## License and origins

MIT; see [LICENSE.md](LICENSE.md). Copyright notices for the upstream code and astralix modifications are retained. See [NOTICE.md](NOTICE.md).
