Giter Site home page Giter Site logo

libpkuipgw's Introduction

libpkuipgw

A library for accessing the Internet through Peking University's Internet service.

I have graduated, so I am unable to do testing and respond to potential API changes.

Overview

All users of Peking University's Internet service need to authenticate when attempting to access out of campus resources. The user can either visit the website its.pku.edu.cn or use a variety of official clients.

However, there's no official API to automate these activities, making it very difficult to connect a Raspberry Pi or an ESP32 to the school's network. Furthermore, the standard APIs are large and cumbersome and have potential security problems (the Windows client require Administrator privileges!). It would be great if there were a library for such actions.

Thankfully, the APIs are pretty straightforward to reimplement. So I have implemented:

  • connect: Authenticate and gain Internet access.
  • close & close_all: Close access to the Internet.
  • get_connections: Get connection information under the same account. The other functionalities are not frequently used and are better left to the Web interface

The APIs are described in detail here. The specific APIs of the Linux client are described here

Now I can connect my ESP32 or Raspberry Pi to Wireless PKU, or have my Ubuntu automatically connect to school network upon startup. How wonderful!

Languages Implemented

The different implementations are listed here. Perhaps I'll expand this library to more languages and platforms if I have time:

  • Python
  • Arduino ESP32
  • ESP32: TODO. Developing ESP32 using ESP-IDF is really frustrating.
  • Shell: TODO
  • Java or Kotlin if I'm really bored

Usage

To be continued...

libpkuipgw's People

Contributors

yibaimeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

libpkuipgw's Issues

Does it still work

The ssid of campus network was updated from "Wireless PKU" to "PKU", does the lib still work

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.