Skip to content

基于openwrt软路由系统中,软件包wifidog luci-app-wifidog的认证服务器实现

Notifications You must be signed in to change notification settings

gralliry/Wifidog-AuthServer-Gin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wifidog-Server-Gin

描述

本项目是基于openwrt软路由系统中,软件包wifidog luci-app-wifidog的认证服务器实现

使用

git clone https://github.com/gralliry/Wifidog-Server-Gin.git
cd Wifidog-Server-Gin
go run main.go

打开服务->wifodog配置有几项需要与config.toml中对应:

Port(当前程序运行的端口,注意在config.toml中是字符串)

通用配置->设备ID(一般是路由器mac地址,对应上你wifidog的配置页面内容即可)

认证服务器配置

  • 认证服务器:url路径 -> /wifidog/
  • 服务器login接口脚本url路径段 -> login/?
  • 服务器portal接口脚本url路径段 -> portal/?
  • 服务器ping接口脚本url路径段 -> ping/?
  • 服务器auth接口脚本url路径段 -> auth/?
  • 服务器消息接口脚本url路径段 -> gw_message.php?

设置你的网关地址GWAdress(一般是10.0.0.1)和端口GWPort(一般是2060,注意在config.toml中是字符串)

作者留言

如果是路由器本身作为认证服务器,极力建议使用可执行文件(而不是使用go命令运行源码,其环境和程序占用都过大)

./wifidog-auth-server

如果路由器存在go语言环境,你也可以直接运行源码

go run main.go

自编译

go env -w GOOS=linux CGO_ENABLED=1
go build -ldflags="-s -w" -o auth-server main.go

About

基于openwrt软路由系统中,软件包wifidog luci-app-wifidog的认证服务器实现

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published