Skip to content

A robust automatic login client for Southwest University (Chongqing, China) campus network. 西南大学校园网认证工具,基于GO语言

License

Notifications You must be signed in to change notification settings

AlchemyHAN/SWU-Network-Pass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SWU-Network-Pass

SWU-Network-Pass is a robust automatic login client for Southwest University (Chongqing, China) campus network. Until 18th, September, 2024, Southwest University campus network uses RuiJie web-based authentication system. Designed to ensure continuous internet access without interruptions, this Go-based tool automates network verification and re-login procedures. It's especially useful for managing network connectivity issues seamlessly with built-in network status checks and automatic reconnection, now structured into focused packages for accounts, status probing, crypto, and login flows, and configurable entirely through command-line flags.

Features

  • Automatic Network Detection and Recovery: Ensures your device maintains uninterrupted network access by detecting disruptions and performing automatic logins.
  • Support for Encrypted Passwords: Enhances security by encrypting passwords before transmission. Enable or disable encryption with a simple CLI flag.
  • Context-Aware Requests: Uses timeouts and context cancellation to keep the CLI responsive in unstable network environments.
  • Selectable ISP Enforcement: Optionally target CMCC, CT, or CU; the client logs out and retries if the detected uplink carrier does not match.
  • Flexible CLI Configuration: Adjust accounts path, encryption, and ISP selection on demand without editing configuration files.
  • Cross-Platform Compatibility: Runs efficiently across a variety of operating systems and architectures.
  • Lightweight and Efficient: Optimized for minimal resource consumption, perfect for devices with limited hardware capabilities.
  • User-Friendly Configuration: Simple setup with a straightforward accounts file and self-explanatory command-line flags.

Table of Contents

  1. Installation
  2. Configuration
  3. Usage
  4. Supported Platforms
  5. Contributing
  6. License

Installation

Download the latest release suitable for your system from the Releases page.

Installation Steps:

  1. Extract the downloaded file to a desired location. (For Unix-like systems, you can use the following command to extract the tarball: tar -xzvf SWU-Network-Pass_Linux_arm64.tar.gz)
  2. Ensure the binary is executable (you might need to change permissions on Unix-like systems).

Configuration

Accounts File Setup:

  • Create a file named accounts.txt in the same directory as the executable.
  • Add your login credentials in the format: username password

Example:

lilei abc123456@
hanmeimei xyz789012#

Command-Line Flags:

  • --accounts (default accounts.txt): Custom path to the credentials file.
  • --encryption: Enable password encryption when the portal requires RSA-encrypted submissions. Omit the flag to keep plaintext logins.
  • --isp (CMCC, CT, CU): Enforce login to a specific carrier. When set, the client validates the public IP after login and forces a logout if the detected ISP does not match, allowing the next iteration to retry.
  • --help: Display the full list of supported flags.

ISP codes are case-sensitive; use uppercase values.

Usage

Change working directory to the location of the binary before running the client, then execute the binary with any desired flags. The client will:

  • Monitor the network status continuously.
  • Automatically attempt to login using the credentials from accounts.txt when it detects network disruptions.

Running the Client:

cd /path/to/binary
./swu-network-pass --encryption --isp=CMCC

The example above enables password encryption and asks the client to keep retrying until it authenticates through China Mobile (CMCC). Omit --isp to accept whichever carrier the portal assigns.

When running directly from source (useful during development or when you prefer not to download the release binary), you can execute:

go run ./cmd/online-check --accounts ./accounts.txt --encryption --isp=CMCC

Supported Platforms

This client is precompiled for a range of operating systems and architectures:

  • Operating Systems and Architectures:
    • Windows (x86_64, x86, arm64, armv7)
    • Linux (x86_64, x86, arm64, armv7, armv6, mips64, ppc64, ppc64le, s390x, riscv64, loong64)
    • macOS (Darwin) (x86_64, arm64 (Apple Silicon))
    • FreeBSD (x86_64, x86, arm64, armv7, armv6)
    • OpenBSD (x86_64, x86, arm64, armv7, armv6)
    • NetBSD (x86_64, x86, arm64, armv7, armv6)
    • Solaris (x86_64)

Refer to the Releases page for detailed information about each supported platform.

Building from Source

Prerequisites:

  • Go 1.23 or later

Follow these steps to build the client:

  1. Clone the repository: git clone https://github.com/AlchemyHAN/SWU-Network-Pass.git
  2. Change working directory: cd SWU-Network-Pass
  3. Build the client: go build -o swu-network-pass ./cmd/online-check

Contributing

Contributions are welcome and greatly appreciated. To contribute:

  1. Fork the repository.
  2. Create your feature branch (git checkout -b feature/myNewFeature).
  3. Commit your changes (git commit -am 'Add some great feature').
  4. Push to the branch (git push origin feature/myNewFeature).
  5. Open a Pull Request.

License

This project is licensed under the GPL-3.0 License. For more information, refer to the LICENSE file.


Disclaimer: This software is intended for educational and research purposes in Southwest University only. The developer is not responsible for any misuse or damage caused by this tool. Use at your own risk.

About

A robust automatic login client for Southwest University (Chongqing, China) campus network. 西南大学校园网认证工具,基于GO语言

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages