ChatNet
ChatNet is the ChatArch generic network helper package. It owns reusable network and portal/session helpers such as:
- ICMP ping scanning and TCP port scanning;
- URL collection and link checking;
- browser/chromedriver/playwright service URL health checks;
- service URL helpers such as
append_token()andensure_path(); - browser-like
requests.Sessionsetup with common headers; - state-file backed cookie persistence;
- cookie header parsing/export;
- simple HTML table parsing helpers;
- safe request-spec / curl-preview generation for dry-run workflows;
- non-sudo explicit forward proxy serving, checking, and user autostart for trusted LAN clients.
Application-level campus portal logic belongs in packages such as ChatECNU, which depends on ChatNet for generic network and portal helpers.
Quick start
pip install -e ".[dev]"
chatnet --help
chatnet --tree
chatnet --tree-brief
chatnet links --url https://example.com
CHATNET_PROXY_PASSWORD='<password>' chatnet proxy serve --bind 0.0.0.0 --port 18080 --allow-cidr 172.23.0.0/16 --user chatnet
CHATNET_PROXY_PASSWORD='<password>' chatnet proxy check --proxy-url http://127.0.0.1:18080 --user chatnet
chatnet proxy autostart print --bind 0.0.0.0 --port 18080 --allow-cidr 172.23.0.0/16 --user chatnet
chatenv status -t chatnet --detail
python -m pytest -q
chatnet --tree renders the registered command surface with signatures through ChatStyle; chatnet --tree-brief renders the same nodes without signatures. Tree output names sensitive options but never contains their values.
Proxy defaults can also come from ChatEnv under $CHATARCH_HOME/envs/ChatNet/.env:
CHATNET_PROXY_BIND='127.0.0.1'
CHATNET_PROXY_PORT='18080'
CHATNET_PROXY_ALLOW_CIDR='127.0.0.0/8'
CHATNET_PROXY_USER='chatnet'
CHATNET_PROXY_PASSWORD='<password>'
离线网络恢复
Linux + NetworkManager 可使用 chatnet recovery check 诊断、chatnet recovery run --execute --json-output 受控恢复,并用 chatnet recovery logs 读取带时间、incident 和阶段结果的私有持久事件。设备信息和阈值由 ChatEnv 管理,不放进日常命令参数。运行态遵循 CHATARCH_HOME,不依赖项目目录或联网下载。
参见 离线网络恢复,包括权限、冷却、有限日志保留和持久化恢复预算。接口消失回退只接受先前缓存且当前仍可核验的内核设备/驱动身份、未改变的连接以及独立物理有线救援路径;不满足任一条件便停止。只提供一次性恢复,不启用后台监控。恢复是缓解措施,不等于修复硬件根因。
Boundary
ChatNet should stay application-neutral. ECNU login, visitor management, ECNU-specific ChatEnv schema, and ECNU CAPTCHA behavior belong in ChatECNU, not in ChatNet.
Metadata
Release files for ChatNet 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| chatnet-0.2.4.tar.gz | 52.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chatnet-0.2.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 93.5 kB
Release files / chatnet-0.2.4.tar.gz
| Download URL | chatnet-0.2.4.tar.gz |
|---|---|
| Size | 52.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
18faf51c2eb6599a56d95376f09315d062f20ab13d79a3585c0ffb754ce60f30
|
|
BLAKE2b-256 checksum How to use checksums |
77a480a664e6a31888740de40b8a0cf1334a796eb845e3d847fb759ce5d08140
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.
Transparency logRelease files / chatnet-0.2.4-py3-none-any.whl
| Download URL | chatnet-0.2.4-py3-none-any.whl |
|---|---|
| Size | 40.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d031172dfefbd1a446f73b509352483dad69f8ac2d09d3ae1c3873f95012e6af
|
|
BLAKE2b-256 checksum How to use checksums |
e581c560434a628ebd2ebffb89e4d99ad518637e21ed85a8af231b222d790b46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.
Transparency log