Skip to main content

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() and ensure_path();
  • browser-like requests.Session setup 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,不依赖项目目录或联网下载。

参见 离线网络恢复,包括权限、冷却、有限日志保留和持久化恢复预算。接口消失回退只接受先前缓存且当前仍可核验的内核设备/驱动身份、未改变的连接以及独立物理有线救援路径;同一设备的 DRIVER 绑定字段消失不会单独阻止核验,旧缓存须精确核验后迁移。模块加载后还须确认原设备已绑定并出现目标无线接口。不满足任一条件便停止。只提供一次性恢复,不启用后台监控。恢复是缓解措施,不等于修复硬件根因。

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.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ChatNet 0.2.5
File Size Uploaded
chatnet-0.2.5.tar.gz 55.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ChatNet 0.2.5
File Interpreter ABI Platform
chatnet-0.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 97.6 kB

Release files / chatnet-0.2.5.tar.gz

Download URL chatnet-0.2.5.tar.gz
Size 55.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4e59a41a9fdf3aed8c9d11f4ddd782409a0c724f24f22263371b4b3dd8f2a1df
BLAKE2b-256 checksum
How to use checksums
2612596313a9a8b112e03d6a2d1dc62e66a0140bf78561e13b0dec5e5a3a41b6
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 14, 2026.

Transparency log

Release files / chatnet-0.2.5-py3-none-any.whl

Download URL chatnet-0.2.5-py3-none-any.whl
Size 41.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
53fd6745ac4bb8c710708267c4e3b908d47bec67dc9bcd961760a72297d5f10e
BLAKE2b-256 checksum
How to use checksums
9306fff56a087d9193ad9e739369c3bc1541736575cc48de574d5334427df6ec
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 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.5 This release

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page