1、从https://github.com/wifidog/wifidog-gateway上下载wifidog-gateway-master.zip,解压得到wifidog-gateway-master文件夹,丢到android源码目录下的extern文件夹。
2、修改src\conf.h,在extern pthread_mutex_t config_mutex;这一行之前添加#include <pthread.h>。
3、在wifidog-gateway-master文件夹下创建Android.mk文件,内容如下:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)LOCAL_MODULE := wifidog
LOCAL_C_INCLUDES=$(LOCAL_PATH)/libhttpd
LOCAL_SRC_FILES = src/gateway.c \src/auth.c \src/client_list.c \src/conf.c \src/firewall.c \src/http.c \src/safe.c \src/centralserver.c \src/commandline.c \src/debug.c \src/fw_iptables.c \src/httpd_thread.c \src/ping_thread.c \src/util.c \src/wdctl_thread.c \src/simple_http.c \src/pstring.c \src/wd_util.c \src/main.c \./libhttpd/api.c \./libhttpd/ip_acl.c \./libhttpd/protocol.c \./libhttpd/version.c
LOCAL_LDLIBS += -lpthread
LOCAL_SHARED_LIBRARIES = $(SHARED_LIBRARIES)
include $(BUILD_EXECUTABLE)
4、执行mmm extern/wifidog-gateway-master,在out目录下的system/bin下会生成wifidog。
PS:结合.sh、wifidog.conf和wifidog-msg.html,外加连接认证服务器的程序,可实现android下的portal认证功能
工程源码点击打开链接
咨询的人不少,刚好看到有个完整的流程:热点认证技术实现