NEU_IPGW

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2023 License: MIT

README

NEU_IPGW

东北大学校园网登录脚本

概述

服务器需要在命令行中进行登录,在 github 中找到 neucn/ipgw 这个项目,但是多次尝试总是无法登录,故而基于该项目自行构建了一个简易版本。

学习go工程开发,在v0.2.0中,将项目基于cobra命令行工具进行了重构。

安装

以下安装过程以 Ubuntu 为例,其他系统请使用对应版本。

二进制文件安装
  1. release 页面获取最新版本压缩文件
  2. 解压缩,并赋予执行权限
  3. 部署至/usr/local/bin目录
## example for ubuntu
# download
wget https://github.com/DoraTiger/NEU_IPGW/releases/download/v0.1.0/NEU_IPGW-linux-amd64.tar.gz
# unzip and grant
tar -zxf ./ipgw-linux-amd64.zip
chmod +x ./NEU_IPGW
# move
sudo cp ./NEU_IPGW  /usr/local/bin/
源码安装
  1. 准备 go 语言环境,可参考该博客的 2.3 节。
  2. 编译项目(考虑到服务器本身无网络的情况,提供了vendor目录,支持离线编译,如不需要,请删除makefile中的-mod=vendor)
  3. 部署至/usr/local/bin目录
## example for ubuntu
# download
git clone https://github.com/DoraTiger/NEU_IPGW.git
cd NEU_IPGW
# build
make all
# grant
chmod +x ./build/linux-amd64/NEU_IPGW
# move
sudo cp ./build/linux-amd64/NEU_IPGW /usr/local/bin/

使用

  1. 登录校园网
NEU_IPGW login -u username -p password
  1. 退出登录
NEU_IPGW logout

参考

存在问题

  • mips32位架构程序包无法使用,请在机器上自行编译

Directories

Path Synopsis
cmd
app
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL