Git Product home page Git Product logo

ipgw's People

Contributors

amtoaer avatar bsbds avatar halozhy avatar shimaring avatar unbyte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ipgw's Issues

在登录已欠费用户时报错

虽然不影响使用,但还是报一下吧
报错信息如下:

panic: interface conversion: interface {} is nil, not float64

goroutine 1 [running]:
github.com/neucn/ipgw/pkg/handler.(*IpgwHandler).ParseBasicInfo(0xc000114330)
        github.com/neucn/ipgw/pkg/handler/ipgw.go:148 +0x20e
github.com/neucn/ipgw/pkg/handler.(*IpgwHandler).Login(0xc000114330, 0xc000100460)
        github.com/neucn/ipgw/pkg/handler/ipgw.go:62 +0x88
github.com/neucn/ipgw/pkg/cmd.login(0xc000114330, 0xc94aa9)
        github.com/neucn/ipgw/pkg/cmd/login.go:82 +0x46
github.com/neucn/ipgw/pkg/cmd.loginUseDefaultAccount(0xd1a858)
        github.com/neucn/ipgw/pkg/cmd/cmd.go:66 +0x1fa
github.com/neucn/ipgw/pkg/cmd.glob..func12(0xc0001646c0)
        github.com/neucn/ipgw/pkg/cmd/cmd.go:34 +0xc5
github.com/urfave/cli/v2.(*App).RunContext(0xf569c0, {0xd1a6d0, 0xc000128078}, {0xc0001041f0, 0x1, 0x1})
        github.com/urfave/cli/[email protected]/app.go:322 +0x7a8
github.com/urfave/cli/v2.(*App).Run(...)
        github.com/urfave/cli/[email protected]/app.go:224
main.main()
        ./main.go:10 +0x47

使用的账户在ip网关网页登录时显示用户已欠费

bug

密码如果带 ';' 这个符号会错误。被迫改了学校的密码

无网络请求的时候登录失败

在没有其他使用网络的用户软件的情况下运行

# ipgw
using account 'xxxxxxxx'
login failed: 
	unknown reason

任意发一个公网连接请求后就能正常登录

# curl 1.1.1.1        
<script>top.self.location.href='http://202.118.1.87/index_15.html?wlanuserip=xx.xx.xx.xx&wlanacname=NS_Wifi_N18K&ssid=&nasip=202.118.0.11&snmpagentip=&mac=4a806e361ea3&t=wireless-v2-plain&url=http://1.1.1.1/&apmac=&nasid=NS_Wifi_N18K&vid=2008&port=27&nasportid=AggregatePort 1.20080000:2008-0'</script>

# ipgw
using account 'xxxxxxxx'
login successfully

fail to login

ubuntu22.04 server版,之前一直正常,忽然出现以下问题
$ ipgw info -a
using account '2210536'
fail to login:
Get "https://pass.neu.edu.cn/tpass/login": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

ping校园网内的机器可以通

卸载

如果不想继续使用, 该如何卸载

树莓派4b申请适配

OS: Raspbian GNU/Linux 10 
Linux armv7l

使用release里的linux-arm会报错

Failed to execute process '/usr/local/bin/ipgw'. Reason:
exec: Exec format error
The file '/usr/local/bin/ipgw' is marked as an executable but could not be run by the operating system.

当我尝试自己编译的时候,

rm -rf build/*
GOARCH=amd64 GOOS=darwin CGO_ENABLED=0 go build -trimpath -ldflags '-w -s -X "github.com/neucn/ipgw.Version=v0.1.3-1-g2466602" -X "github.com/neucn/ipgw.Build=2021-05-14T05:10:39+0100" -X "github.com/neucn/ipgw.Repo=neucn/ipgw"' -o build/darwin-amd64/ipgw cmd/ipgw/main.go
flag provided but not defined: -trimpath
usage: go build [-o output] [-i] [build flags] [packages]
Run 'go help build' for details.
make: *** [Makefile:30: darwin-amd64] Error 2
go version go1.11.6 linux/arm

适配校园网网关平台更新

由于校园网网关平台更新,目前 ipgw cli 已失效,需要对新平台进行适配。

需适配部分

  • 网关操作
    • 登录
    • 登陆后获取连接信息
    • 下线
    • 测试校园网环境(是否已登录,是否在校园网内)
  • 数据查询
    • 套餐信息
    • 已登录设备信息
    • 登录日志
    • 充值信息
    • 扣费信息

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.