Skip to main content

适用于深澜网关的校园网第三方登录器

Project description

校园网自动登陆器(深澜网关专用)

支持功能

  1. 记住账号密码
  2. 开机自动启动
  3. 掉线自动重连
  4. 从命令行操作

界面展示

界面展示

使用说明

方法一: 通过 pip 安装 srunpy 并运行 srunpy (推荐)

# 需要先安装Python 3.7~3.12
pip install srunpy
srunpy

初次启动时会自动创建桌面快捷方式,之后可以直接双击桌面快捷方式启动程序。

本程序默认使用Edge WebView2作为浏览器内核,可修改为QtWebEngine, 可用

pip install srunpy[qt]
srunpy --qt

方法二: 前往 Github Release 下载SRunClient.zip,解压后直接运行

方法三: 从Github Clone 本项目,然后安装

git clone https://github.com/HofNature/SRunPy-GUI.git
cd SRunPy-GUI
pip install .
srunpy

方法四: Clone 本项目,使用 environment.yaml 创建 Anaconda 环境,然后运行 srun_client.py

git clone https://github.com/HofNature/SRunPy-GUI.git
conda env create -f environment.yaml
conda activate srunpy
python srun_client.py

此方法无需安装Python环境,但无法使用命令行操作,且由于应用程序未签名,可能会被Windows Defender或其他杀毒软件误报。

本程序默认设置为北航网关,其它使用深澜网页认证的用户可以点击界面左侧的设置按钮修改为自己学校的认证地址。

配置文件位于C:\Users<用户名>\AppData\Roaming\SRunPy,其中的config.json文件保存了用户的账号密码等信息。

命令行使用说明

本程序也支持命令行操作,以下是一些常用命令:

  • 查看网关状态:
    srunpy-cli --info
    
  • 登录网关:
    srunpy-cli --login --username <你的用户名> --passwd <你的密码>
    
  • 登出网关:
    srunpy-cli --logout
    

TODO

  1. 编写注释
  2. 支持 GUI 修改断线重连超时

经测试院校

  1. 北京航空航天大学 沙河校区

致谢

本程序后端基于 iskoldt/srunauthenticator 修改

前端基于 r0x0r/pywebview 开发

界面字体为 MiSans Medium


Campus Network Auto Login Tool (For Srun Gateway)

Supported Features

  1. Remember account and password
  2. Auto start on boot
  3. Auto reconnect on disconnection
  4. Operate from command line

Interface Display

Interface Display

Usage Instructions

Method 1: Install srunpy via pip and run srunpy (Recommended)

# Requires Python 3.7~3.12
pip install srunpy
srunpy

The first time you start, a desktop shortcut will be created automatically. You can then start the program by double-clicking the desktop shortcut.

This program uses Edge WebView2 as the browser engine by default. It can be changed to QtWebEngine, available with

pip install srunpy[qt]
srunpy --qt

Method 2: Go to Github Release to download SRunClient.zip, unzip and run directly

Method 3: Clone this project from Github and then install

git clone https://github.com/HofNature/SRunPy-GUI.git
cd SRunPy-GUI
pip install .
srunpy

Method 4: Clone this project, create an Anaconda environment using environment.yaml, and then run srun_client.py

git clone https://github.com/HofNature/SRunPy-GUI.git
conda env create -f environment.yaml
conda activate srunpy
python srun_client.py

This method does not require a Python environment, but cannot use command line operations. Also, since the application is unsigned, it may be falsely flagged by Windows Defender or other antivirus software.

This program is set to the Beihang University gateway by default. Other users using Srun web authentication can click the settings button on the left side of the interface to change to their school's authentication address.

The configuration file is located at C:\Users<username>\AppData\Roaming\SRunPy, where the config.json file saves the user's account and password information.

Command Line Usage Instructions

This program also supports command line operations. Here are some common commands:

  • Check gateway status:
    srunpy-cli --info
    
  • Login to gateway:
    srunpy-cli --login --username <your username> --passwd <your password>
    
  • Logout from gateway:
    srunpy-cli --logout
    

TODO

  1. Write comments
  2. Support GUI modification of disconnection reconnection timeout

Tested Schools

  1. Beihang University Shahe Campus

Acknowledgements

The backend of this program is modified from iskoldt/srunauthenticator

The frontend is developed based on r0x0r/pywebview

The interface font is MiSans Medium

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

srunpy-1.0.6.4.tar.gz (5.5 MB view details)

Uploaded Source

Built Distribution

srunpy-1.0.6.4-py3-none-any.whl (5.5 MB view details)

Uploaded Python 3

File details

Details for the file srunpy-1.0.6.4.tar.gz.

File metadata

  • Download URL: srunpy-1.0.6.4.tar.gz
  • Upload date:
  • Size: 5.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for srunpy-1.0.6.4.tar.gz
Algorithm Hash digest
SHA256 8d6e36effe7fb86b412fff29f9970a34fddbc39049198fee3fbfa70ff0277c01
MD5 ce58215c5c039f7a084f86ed8b356a86
BLAKE2b-256 10586c30093f3b119d4161049b3eba021efdda916e540ab479417529a089ea86

See more details on using hashes here.

File details

Details for the file srunpy-1.0.6.4-py3-none-any.whl.

File metadata

  • Download URL: srunpy-1.0.6.4-py3-none-any.whl
  • Upload date:
  • Size: 5.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for srunpy-1.0.6.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c67d4c13d5fba73c4ce98bb4c38c2dbc5f707135c1a877cd493a821dfeeb4be9
MD5 90adf1f82f2f5392b8e5df819d885aa8
BLAKE2b-256 5ca6d3d9eb6b5561119be7726ba4920ee8995dc780051028baab9aec2aea797e

See more details on using hashes here.

Supported by

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