Git Product home page Git Product logo

goauthing's Introduction

GoAuthing

Build Status GPLv3

A commandline Tunet (auth4/6.tsinghua.edu.cn, Tsinghua-IPv4) authentication tool.

Download Binary

Prebuilt binaries available at https://github.com/z4yx/GoAuthing/releases

Usage

Simply try ./auth-thu, then enter your user name and password.

NAME:
   auth-thu - Authenticating utility for Tsinghua

USAGE:
   auth-thu [options]
   auth-thu [options] auth [auth_options]
   auth-thu [options] login
   auth-thu [options] logout

VERSION:

   1.4

AUTHORS:
  Yuxiang Zhang <[email protected]>
  Nogeek <[email protected]>

COMMANDS:
     auth    (default) Auth via auth4/6.tsinghua
       OPTIONS:
           --ip value      authenticating for specified IP address
           --no-check, -n  skip online checking, always send login request
           --logout, -o    log out of the online account
           --ipv6, -6      authenticating for IPv6 (auth6.tsinghua)
           --host value    use customized hostname of srun4000
           --insecure      use http instead of https
     login   Login via net.tsinghua
     logout  Logout via net.tsinghua

GLOBAL OPTIONS:
   --username name, -u name          your TUNET account name
   --password password, -p password  your TUNET password
   --config-file path, -c path       path to your config file, default ~/.auth-thu
   --hook-success value              command line to be executed in shell after successful login/out
   --debug                           print debug messages
   --help, -h                        print the help
   --version, -v                     print the version

Write a config file to store your username & password or other options in the following format. The default location of config file is ~/.auth-thu.

{
  "username": "your-username",
  "password": "your-password",
  "host": "auth4.tsinghua.edu.cn",
  "ip": "166.xxx.xx.xx",
  "debug": false,
  "useV6": false,
  "noCheck": false,
  "insecure": false
}

To configure automatic authentication on systemd based Linux distro, take a look at docs folder. Just modify the path in configure files, then copy them to /etc/systemd/system folder.

Build

Requires Go 1.11 or above

export GO111MODULE=on
go build -o auth-thu github.com/z4yx/GoAuthing/cli

Acknowledgments

This project was inspired by the following projects:

goauthing's People

Contributors

ritou11 avatar z4yx avatar

Watchers

 avatar  avatar

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.