适用于深澜网关的校园网第三方登录器
Project description
校园网自动登陆器(深澜网关专用)
支持功能
- 记住账号密码
- 开机自动启动
- 掉线自动重连
- 从命令行操作
界面展示
使用说明
方法一: 通过 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
- 编写注释
- 支持 GUI 修改断线重连超时
经测试院校
- 北京航空航天大学 沙河校区
致谢
本程序后端基于 iskoldt/srunauthenticator 修改
前端基于 r0x0r/pywebview 开发
界面字体为 MiSans Medium
Campus Network Auto Login Tool (For Srun Gateway)
Supported Features
- Remember account and password
- Auto start on boot
- Auto reconnect on disconnection
- Operate from command line
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
- Write comments
- Support GUI modification of disconnection reconnection timeout
Tested Schools
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file srunpy-1.0.6.6.tar.gz
.
File metadata
- Download URL: srunpy-1.0.6.6.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 365c403e4e090d17eb4d6011ad296ca26db622f2e980809b68b11d23ef26b8ce |
|
MD5 | 8a776733139e4e5c07c0a1182d9a7243 |
|
BLAKE2b-256 | 7b7cde9ed711ba7daed7eb8b3d1d7aba58fac7c5583d487404f72d6e7c4e6767 |
File details
Details for the file srunpy-1.0.6.6-py3-none-any.whl
.
File metadata
- Download URL: srunpy-1.0.6.6-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | f274ae3822102ce73c54065303fbdabed2345e8d575d0a9c6dbfe59472efc648 |
|
MD5 | 0bb548abc7cb528d2116b2b48f78cbb0 |
|
BLAKE2b-256 | 1c07e48f7e909235b8f549a883b9081cd3c83c193f4f4576527c8bb3f1c80670 |