Skip to main content

使用 CLI 进行中科院计算所上网认证登陆

Project description

ICT Auth

✨全新的 2.0 版本:使用 pip 即可安装**(并且无需 sudo 权限)**!

使用 CLI 进行中科院计算所上网认证登陆。

核心想法:

  • ipv6 网络在未认证的情况下可用
  • 使用浏览器的无头模式来模拟网页操作

安装

pip install ict-auth

这会通过 ipv6 网络下载安装包并进行安装。

常见问题:

  1. 如果服务器上没有安装 pip,可以尝试以下命令安装 pip:

    python3 -m ensurepip --default-pip
    
  2. 如果服务器正确连接网线但没有获取到公网 ipv6 地址,可以在本地手动下载安装包再使用 scp 拷贝至远程服务器

使用

登陆/退出/当前状态

ict_auth

这会检测当前的登陆状态:

  • 如果是未登录情况,默认会进行登陆过程
  • 如果已登录,则会打印当前信息,并询问是否退出登陆

自动重连 (Beta)(暂未重构完成)

据观察,所里的网络偶尔会自动断开,可以使用 enable 将程序注册为后台服务,持续检测上网认证状态。如果发现网络断开,则自动进行登陆。默认检测频率是每分钟一次,如果出错则十分钟后进行重试。

注意:这会在本地明文保存账号与密码,存在账号安全隐患(待优化)

ict_auth enable

使用 disable 取消持久连接(这会卸载系统服务并清空账号信息)

ict_auth disable

使用 logs 查看持久连接日志

ict_auth logs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ict_auth-2.0.0.tar.gz (91.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ict_auth-2.0.0-py3-none-any.whl (91.9 MB view details)

Uploaded Python 3

File details

Details for the file ict_auth-2.0.0.tar.gz.

File metadata

  • Download URL: ict_auth-2.0.0.tar.gz
  • Upload date:
  • Size: 91.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ict_auth-2.0.0.tar.gz
Algorithm Hash digest
SHA256 10e9afff71d2b701f09b56b9728a21b5c7a2a4801093b51eb2485bb73cacde94
MD5 30bb24c9b3458ccf0b361fc23bad9c71
BLAKE2b-256 2ebd04da63f356a168cffa81b15f9f221838281f679805467b5f32fbcf5f0faf

See more details on using hashes here.

Provenance

The following attestation bundles were made for ict_auth-2.0.0.tar.gz:

Publisher: build_test_publish.yml on jklincn/ict_auth

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ict_auth-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: ict_auth-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 91.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ict_auth-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bb8bafb4cb902ef456fb00cb8b7b7c0c2b7501b36203963cb8c3b695b6db87af
MD5 0ad7667ca1f0bb182a3944a0b8f7b8d8
BLAKE2b-256 caff927666ddc0d656bfa9f517f3804e61714d07daf6e2ba5f8c1fa6f3a742c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for ict_auth-2.0.0-py3-none-any.whl:

Publisher: build_test_publish.yml on jklincn/ict_auth

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page