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 地址,可以在本地手动下载 whl 安装包再使用 scp 拷贝至远程服务器

使用

登陆/退出/当前状态

ict_auth

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

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

自动重连 (Beta)

据观察,所里的网络偶尔会自动断开,可以使用 enable 将程序注册为后台服务,持续检测上网认证状态。如果监测到网络断开,则自动进行登陆。默认检测频率为每分钟 1 次,如果程序出错(网络波动导致无法访问认证页面等情况)则十分钟后进行重试。

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

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.1.1.tar.gz (98.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.1.1-py3-none-any.whl (98.9 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ict_auth-2.1.1.tar.gz
  • Upload date:
  • Size: 98.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.1.1.tar.gz
Algorithm Hash digest
SHA256 ed03c9f900463a2160764af095b2a027f23c65303cb2cf19f75a92a48454a3e6
MD5 13a8234d4e3b92e056407f0092c9f374
BLAKE2b-256 97120f465ae8de5dc8b4a4b2a32df0f7a16dd79959489f58c5b478ea9ff1dc4b

See more details on using hashes here.

Provenance

The following attestation bundles were made for ict_auth-2.1.1.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.1.1-py3-none-any.whl.

File metadata

  • Download URL: ict_auth-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 98.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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f0d6ab83a59ea1b7df61c22ef50d805c24bcd9985981b867054bf66e30134dda
MD5 18fd4959ae262437c67fae53a4584c34
BLAKE2b-256 a88b1853805e74233807bbce7767aee47c61309319b357b6c88b904a00a8a53a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ict_auth-2.1.1-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