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.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.1.0-py3-none-any.whl (91.9 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ict_auth-2.1.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.1.0.tar.gz
Algorithm Hash digest
SHA256 530e89d367cd477ab30cb68ee895b88da9bc322f42b7ec53a72055a969ddda86
MD5 b922365e6a026bb99c5efde86d093feb
BLAKE2b-256 92553ac43fff31673dd3366abdc6a76ca2d0d54668c7ab0a6889282eaa4d4cce

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: ict_auth-2.1.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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3d0cb574db96cb636b2d1a322b8c941e1becb4403da6a9a338f5caac06769f6f
MD5 c259ef454046c6dc84b23eda3f7a0e63
BLAKE2b-256 5ae78b730697eec45d5bb3e375388b8f97ce0a38e6dd26777f8767ebce97c96e

See more details on using hashes here.

Provenance

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