Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: liudf0716/apfree-wifidog
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6.08.1950
Choose a base ref
...
head repository: liudf0716/apfree-wifidog
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Nov 12, 2023

  1. dhcp_cpi: add dhcp cpi feature

    Signed-off-by: staylightblow8 <liudf0716@gmail.com>
    liudf0716 committed Nov 12, 2023
    Copy the full SHA
    b589652 View commit details
  2. config: add bypass auth flag

    Signed-off-by: staylightblow8 <liudf0716@gmail.com>
    liudf0716 committed Nov 12, 2023
    Copy the full SHA
    c380b6d View commit details
  3. dhcp_cpi: add dhcp cpi feature

    Signed-off-by: staylightblow8 <liudf0716@gmail.com>
    liudf0716 committed Nov 12, 2023
    Copy the full SHA
    75bdc18 View commit details
  4. config: add bypass auth flag

    Signed-off-by: staylightblow8 <liudf0716@gmail.com>
    liudf0716 committed Nov 12, 2023
    Copy the full SHA
    792bfce View commit details

Commits on Nov 18, 2023

  1. fw4_nft: fix nft set set_wifidogx_bypass_clients bug

    Signed-off-by: staylightblow8 <liudf0716@gmail.com>
    liudf0716 committed Nov 18, 2023
    Copy the full SHA
    a0e4176 View commit details
  2. Merge branch 'cpi'

    liudf0716 committed Nov 18, 2023
    Copy the full SHA
    1f6aefe View commit details
  3. fw4_nft: add chain inet fw4 mangle_prerouting_wifidogx_dhcp_cpi

    Type: fix
    
    Signed-off-by: staylightblow8 <liudf0716@gmail.com>
    liudf0716 committed Nov 18, 2023
    Copy the full SHA
    c6cf868 View commit details
  4. dhcp_cpi: add some log

    Signed-off-by: staylightblow8 <liudf0716@gmail.com>
    liudf0716 committed Nov 18, 2023
    Copy the full SHA
    38f2313 View commit details

Commits on Nov 26, 2023

  1. make dhcp cpi and auth bypass default disable

    Signed-off-by: staylightblow8 <liudf0716@gmail.com>
    liudf0716 committed Nov 26, 2023
    Copy the full SHA
    7e338ee View commit details

Commits on Dec 23, 2023

  1. solve CORS problem

    Signed-off-by: staylightblow8 <liudf0716@gmail.com>
    liudf0716 committed Dec 23, 2023
    Copy the full SHA
    b35afd0 View commit details

Commits on Dec 27, 2023

  1. add temporary access to internet for client

    Signed-off-by: staylightblow8 <liudf0716@gmail.com>
    liudf0716 committed Dec 27, 2023
    Copy the full SHA
    5e6ca4a View commit details

Commits on Dec 29, 2023

  1. Copy the full SHA
    6265f6e View commit details

Commits on Jan 3, 2024

  1. add check whether popen success or not

    Signed-off-by: staylightblow8 <liudf0716@gmail.com>
    liudf0716 committed Jan 3, 2024
    Copy the full SHA
    3631256 View commit details
  2. delete package directory which is useless

    Signed-off-by: staylightblow8 <liudf0716@gmail.com>
    liudf0716 committed Jan 3, 2024
    Copy the full SHA
    ef28150 View commit details

Commits on Jan 4, 2024

  1. test: add test script for wifidogx

    Signed-off-by: staylightblow8 <liudf0716@gmail.com>
    liudf0716 committed Jan 4, 2024
    Copy the full SHA
    fec4f43 View commit details
  2. complete fw4 trusted domain, trusted ip and mac feature

    Signed-off-by: staylightblow8 <liudf0716@gmail.com>
    liudf0716 committed Jan 4, 2024
    Copy the full SHA
    13162d5 View commit details
  3. add apfree-wifiodg version and firmware version in ping

    Signed-off-by: staylightblow8 <liudf0716@gmail.com>
    liudf0716 committed Jan 4, 2024
    Copy the full SHA
    f55b181 View commit details
  4. add tmp pass test

    Signed-off-by: staylightblow8 <liudf0716@gmail.com>
    liudf0716 committed Jan 4, 2024
    Copy the full SHA
    a40e057 View commit details

Commits on Jan 22, 2024

  1. delete out-date doc

    Signed-off-by: staylightblow8 <liudf0716@gmail.com>
    liudf0716 committed Jan 22, 2024
    Copy the full SHA
    8371901 View commit details

Commits on Jan 31, 2024

  1. add temporary pass with user defined

    Signed-off-by: staylightblow8 <liudf0716@gmail.com>
    liudf0716 committed Jan 31, 2024
    Copy the full SHA
    9df8c8c View commit details

Commits on Feb 19, 2024

  1. Update the Wi-Fi Dog authentication interface to allow input of clien…

    …t IP and MAC addresses,
    
    enabling the authentication server to grant client access.
    
    Signed-off-by: staylightblow8 <liudf0716@gmail.com>
    liudf0716 committed Feb 19, 2024
    Copy the full SHA
    ca80159 View commit details

Commits on Feb 21, 2024

  1. add ws client thread

    Signed-off-by: staylightblow8 <liudf0716@gmail.com>
    liudf0716 committed Feb 21, 2024
    Copy the full SHA
    69b04e6 View commit details

Commits on Feb 23, 2024

  1. ws_thread add fw_allow client from auth server side

    Signed-off-by: staylightblow8 <liudf0716@gmail.com>
    liudf0716 committed Feb 23, 2024
    Copy the full SHA
    aa0654a View commit details

Commits on Feb 25, 2024

  1. ws add tmp_pass by auth server

    Signed-off-by: staylightblow8 <liudf0716@gmail.com>
    liudf0716 committed Feb 25, 2024
    Copy the full SHA
    ee571b3 View commit details

Commits on Feb 26, 2024

  1. when ws fail or disconnect, reconnect it

    Signed-off-by: staylightblow8 <liudf0716@gmail.com>
    liudf0716 committed Feb 26, 2024
    Copy the full SHA
    4d54dc8 View commit details
  2. add heartbeat to ws_thread

    Signed-off-by: staylightblow8 <liudf0716@gmail.com>
    liudf0716 committed Feb 26, 2024
    Copy the full SHA
    f77b415 View commit details

Commits on Feb 28, 2024

  1. release version 7.02.1977

    Signed-off-by: staylightblow8 <liudf0716@gmail.com>
    liudf0716 committed Feb 28, 2024
    Copy the full SHA
    fe575ed View commit details

Commits on Mar 13, 2024

  1. Delete apfreewifidog.jpg

    liudf0716 authored Mar 13, 2024
    Copy the full SHA
    feba0e8 View commit details

Commits on Mar 14, 2024

  1. Add files via upload

    liudf0716 authored Mar 14, 2024
    Copy the full SHA
    5a25223 View commit details
  2. Copy the full SHA
    f20e992 View commit details
  3. Update README.md

    liudf0716 authored Mar 14, 2024
    Copy the full SHA
    53ba1cc View commit details
  4. Update README.md

    liudf0716 authored Mar 14, 2024
    Copy the full SHA
    db9e4ab View commit details

Commits on Jun 11, 2024

  1. feat: add dns forward and its flag

    Signed-off-by: Dengfeng Liu <liudf0716@gmail.com>
    liudf0716 committed Jun 11, 2024
    Copy the full SHA
    0b1a105 View commit details
  2. feat: create inet wifidogx table and add dns forward redirect rule to it

    Signed-off-by: Dengfeng Liu <liudf0716@gmail.com>
    liudf0716 committed Jun 11, 2024
    Copy the full SHA
    5b899d1 View commit details
  3. improve: move dhcp cpi rule to wifidogx nft table

    Signed-off-by: Dengfeng Liu <liudf0716@gmail.com>
    liudf0716 committed Jun 11, 2024
    Copy the full SHA
    e858c52 View commit details
  4. improve: remove some debug log

    Signed-off-by: Dengfeng Liu <liudf0716@gmail.com>
    liudf0716 committed Jun 11, 2024
    Copy the full SHA
    4c54a5d View commit details
  5. fix: nft wifidogx chain error

    Signed-off-by: Dengfeng Liu <liudf0716@gmail.com>
    liudf0716 committed Jun 11, 2024
    Copy the full SHA
    8e889af View commit details
  6. fix: add delete wifidogx table when destroy

    Signed-off-by: Dengfeng Liu <liudf0716@gmail.com>
    liudf0716 committed Jun 11, 2024
    Copy the full SHA
    f18f7e8 View commit details

Commits on Jun 12, 2024

  1. debug: add some debug info to dns parse

    Signed-off-by: Dengfeng Liu <liudf0716@gmail.com>
    liudf0716 committed Jun 12, 2024
    Copy the full SHA
    8acbcab View commit details
  2. feat: using new method to parse dns's response

    Signed-off-by: Dengfeng Liu <liudf0716@gmail.com>
    liudf0716 committed Jun 12, 2024
    Copy the full SHA
    d588c25 View commit details
  3. refractor: wdctlx command and support wildcard domain operation

    Signed-off-by: Dengfeng Liu <liudf0716@gmail.com>
    liudf0716 committed Jun 12, 2024
    Copy the full SHA
    0fb4432 View commit details
  4. fix: remove all dnsmasq operation

    Signed-off-by: Dengfeng Liu <liudf0716@gmail.com>
    liudf0716 committed Jun 12, 2024
    Copy the full SHA
    871265a View commit details
  5. feat: add show wildcard domain info

    Signed-off-by: Dengfeng Liu <liudf0716@gmail.com>
    liudf0716 committed Jun 12, 2024
    Copy the full SHA
    06e86cf View commit details
  6. debug: add debug info for dns response parse

    Signed-off-by: Dengfeng Liu <liudf0716@gmail.com>
    liudf0716 committed Jun 12, 2024
    Copy the full SHA
    005d856 View commit details
  7. fix: wdctclx add command args parse error

    Signed-off-by: Dengfeng Liu <liudf0716@gmail.com>
    liudf0716 committed Jun 12, 2024
    Copy the full SHA
    79f55a5 View commit details
  8. fix: parse dns answers has problem about cname

    Signed-off-by: Dengfeng Liu <liudf0716@gmail.com>
    liudf0716 committed Jun 12, 2024
    Copy the full SHA
    ed8a3eb View commit details
  9. fix: strrstr bug

    Signed-off-by: Dengfeng Liu <liudf0716@gmail.com>
    liudf0716 committed Jun 12, 2024
    Copy the full SHA
    d5d138a View commit details
  10. debug: add some debug log

    Signed-off-by: Dengfeng Liu <liudf0716@gmail.com>
    liudf0716 committed Jun 12, 2024
    Copy the full SHA
    3669fda View commit details

Commits on Jun 13, 2024

  1. fix: replace parse_name with parse_dns_query_name

    Signed-off-by: Dengfeng Liu <liudf0716@gmail.com>
    liudf0716 committed Jun 13, 2024
    Copy the full SHA
    b49ec8a View commit details
  2. fix: nft add set_wifidogx_inner_trust_domains element error

    Signed-off-by: Dengfeng Liu <liudf0716@gmail.com>
    liudf0716 committed Jun 13, 2024
    Copy the full SHA
    a0864d7 View commit details
Showing with 14,042 additions and 8,617 deletions.
  1. +35 −33 .github/workflows/{linux.yml → build-on-ubuntu.yml}
  2. +15 −0 .gitignore
  3. +79 −21 CMakeLists.txt
  4. +73 −0 ChangeLog.md
  5. +56 −0 README-zh.md
  6. +36 −196 README.md
  7. BIN apfree-wifidog_intr.png
  8. BIN apfreewifidog.jpg
  9. +0 −161 cmake/Modules/CMakeParseArguments.cmake
  10. +0 −68 cmake/Modules/FindCURL.cmake
  11. +0 −21 cmake/Modules/FindJSON-C.cmake
  12. +0 −39 cmake/Modules/FindLibEvent.cmake
  13. +0 −359 cmake/Modules/FindOpenSSL.cmake
  14. +0 −382 cmake/Modules/FindPackageHandleStandardArgs.cmake
  15. +0 −57 cmake/Modules/FindPackageMessage.cmake
  16. +0 −21 cmake/Modules/FindUCI.cmake
  17. +0 −114 doc/apfree_wifidog认证漫游接口说明.md
  18. +25 −25 doc/wifidogx.conf
  19. +2 −7 doc/配合wwas调试方式.md
  20. +6 −0 ebpf/CMakeLists.txt
  21. +33 −0 ebpf/Makefile
  22. +112 −0 ebpf/aw-bpf.c
  23. +41 −0 ebpf/aw-bpf.h
  24. +352 −0 ebpf/aw-bpfctl.c
  25. +122 −0 ebpf/tc-helper.sh
  26. +0 −82 package/apfree_wifidog/files/apfree.crt
  27. +0 −27 package/apfree_wifidog/files/apfree.key
  28. +0 −79 patches/200-configurable_builtin.patch
  29. +0 −111 patches/600-shared-libext.patch
  30. +73 −64 src/CMakeLists.txt
  31. +101 −68 src/auth.c
  32. +39 −42 src/auth.h
  33. +771 −0 src/bypass_user.c
  34. +44 −0 src/bypass_user.h
  35. +783 −392 src/centralserver.c
  36. +26 −60 src/centralserver.h
  37. +79 −50 src/client_list.c
  38. +25 −44 src/client_list.h
  39. +8 −28 src/commandline.c
  40. +4 −25 src/commandline.h
  41. +5 −28 src/common.h
  42. +629 −915 src/conf.c
  43. +254 −351 src/conf.h
  44. +51 −56 src/debug.c
  45. +30 −44 src/debug.h
  46. +226 −0 src/dhcp.c
  47. +64 −0 src/dhcp.h
  48. +294 −0 src/dhcp_cpi.c
  49. +35 −0 src/dhcp_cpi.h
  50. +381 −0 src/dns_forward.c
  51. +34 −0 src/dns_forward.h
  52. +375 −138 src/firewall.c
  53. +28 −40 src/firewall.h
  54. +4 −26 src/fw3_iptc.c
  55. +4 −26 src/fw3_iptc.h
  56. +0 −553 src/fw4_nft.c
  57. +0 −42 src/fw4_nft.h
  58. +31 −670 src/fw_iptables.c
  59. +5 −36 src/fw_iptables.h
  60. +1,669 −0 src/fw_nft.c
  61. +73 −0 src/fw_nft.h
  62. +690 −329 src/gateway.c
  63. +35 −39 src/gateway.h
  64. +838 −176 src/http.c
  65. +22 −54 src/http.h
  66. +56 −0 src/ipv4.c
  67. +47 −0 src/ipv4.h
  68. +239 −0 src/json_test.c
  69. +8 −24 src/main.c
  70. +34 −87 src/mqtt_thread.c
  71. +7 −31 src/mqtt_thread.h
  72. +172 −0 src/options.c
  73. +45 −0 src/options.h
  74. +225 −71 src/ping_thread.c
  75. +9 −27 src/ping_thread.h
  76. +0 −131 src/pstring.c
  77. +0 −51 src/pstring.h
  78. +102 −100 src/safe.c
  79. +63 −42 src/safe.h
  80. +0 −259 src/ssh_client.c
  81. +0 −57 src/ssh_client.h
  82. +0 −34 src/ssl_redir.h
  83. +149 −128 src/{ssl_redir.c → tls_thread.c}
  84. +12 −0 src/tls_thread.h
  85. +110 −91 src/util.c
  86. +12 −32 src/util.h
  87. +7 −1 src/version.h
  88. +328 −138 src/wd_client.c
  89. +78 −47 src/wd_client.h
  90. +907 −402 src/wd_util.c
  91. +24 −33 src/wd_util.h
  92. +0 −296 src/wdctl.c
  93. +0 −70 src/wdctl.h
  94. +417 −143 src/wdctl_thread.c
  95. +4 −28 src/wdctl_thread.h
  96. +295 −0 src/wdctlx.c
  97. +1,085 −172 src/ws_thread.c
  98. +18 −22 src/ws_thread.h
  99. +48 −0 test/aw-create-bypass-env.sh
  100. +10 −0 test/aw_fw4.nft
  101. +4 −0 test/aw_if_test.sh
  102. +54 −0 test/create-fw4.sh
  103. +146 −0 test/wdctlx_test.sh
  104. +6 −0 test/wdctlx_test_add_auth_client.sh
  105. +6 −0 test/wdctlx_test_add_online_client.sh
  106. +23 −0 test/wdctlx_test_trust_domain.sh
  107. +11 −0 test/wifidogx.conf
  108. +6 −0 test/wifidogx_test_tmp_pass.sh
  109. +15 −0 update-version.sh
  110. +385 −0 wifi-config
  111. +157 −0 wifi-diag
  112. +1 −1 wifidog-redir.html.front
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
name: compile apfree-wifidog in ubuntu system

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
firewall:
description: 'Firewall version (fw4 or fw3)'
required: true
default: 'fw4'
type: choice
options:
- fw4
- fw3

env:
BUILD_TYPE: Release
@@ -25,46 +28,45 @@ jobs:
sudo apt-get update -y
sudo apt-get install -y libjson-c-dev
sudo apt-get install -y libevent-dev
sudo apt-get install -y lua5.1 lua5.1-dev
sudo apt-get install -y nftables
- name: install libubox
sudo apt-get install -y libnftnl-dev libmnl-dev
sudo apt-get install -y libnetfilter-queue-dev
sudo apt-get install -y libmosquitto-dev
- name: install libubox for apfree wifidog
run: |
git clone https://github.com/git-openwrt-org-mirror/libubox.git
git clone https://github.com/liudf0716/libubox.git
cd libubox
mkdir build && cd build && cmake ..
cmake .
make
sudo make install
- name: install uci
- name: install uci for apfree wifidog
run: |
git clone https://github.com/git-openwrt-org-mirror/uci.git
git clone https://github.com/liudf0716/uci.git
cd uci
mkdir build && cd build && cmake ..
sudo make install
- name: compile apfree-wifidog fw4
run: |
mkdir build
cd build
cmake ..
cmake .
make
ldd src/wifidogx
ldd src/wdctlx
sudo make install
- name: install iptables lib for apfree wifidog
run: |
if: ${{ github.event.inputs.firewall == 'fw3' }}
run: |
git clone https://github.com/liudf0716/iptables-apfree-wifidog.git
cd iptables-apfree-wifidog
./autogen.sh
./configure --disable-nftables
make
sudo make install
- name: compile apfree-wifidog fw3
- name: compile apfree-wifidog
run: |
mkdir -p build
cd build
rm -rf *
cmake -DAW_FW3=ON ..
if [ "${{ github.event.inputs.firewall }}" = "fw3" ]; then
cmake -DAW_FW3=ON ..
else
cmake ..
fi
make

ldd src/wifidogx
ldd src/wdctlx
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -32,4 +32,19 @@
*.dSYM/
*.su

# swap files
*.swp
*.swo
*.swn
*.swm

# Files generated by Visual Code
.vscode/

build/

*.bak

.tags
tags

100 changes: 79 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,32 +1,90 @@
cmake_minimum_required(VERSION 2.8.12)
project(ApFreeWiFidog C)
cmake_minimum_required(VERSION 3.12)

project(apfree-wifidog
VERSION 1.0.0
DESCRIPTION "ApFree WiFiDog"
LANGUAGES C)

INCLUDE(GNUInstallDirs)

# Set C standard and module path
set(CMAKE_C_STANDARD 11)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
set(CMAKE_C_STANDARD_REQUIRED ON)

# Options
option(AW_DEBUG "Build with debug support" ON)
option(AW_FW3 "Build with iptables support" OFF)
option(AW_VPP "Build with VPP support" OFF)

# VPP-specific variables (added)
if(AW_VPP)
set(VPP_INCLUDE_DIR "" CACHE PATH "Path to VPP include directory")
set(VPP_LIBRARY_DIR "" CACHE PATH "Path to VPP library directory")
if(NOT VPP_INCLUDE_DIR OR NOT VPP_LIBRARY_DIR)
message(FATAL_ERROR "VPP_INCLUDE_DIR and VPP_LIBRARY_DIR must be set when AW_VPP is ON")
else()
message(STATUS "VPP_INCLUDE_DIR: ${VPP_INCLUDE_DIR}")
message(STATUS "VPP_LIBRARY_DIR: ${VPP_LIBRARY_DIR}")
endif()
endif()

# Find requried headers file
find_package(PkgConfig REQUIRED)

find_path(UCI_INCLUDE_DIRS uci.h)
if(NOT UCI_INCLUDE_DIRS)
message(FATAL_ERROR "UCI headers not found. Please install libuci-dev.")
endif()

# Find dependencies using pkg-config
pkg_check_modules(LIBEVENT REQUIRED libevent)
pkg_check_modules(OPENSSL REQUIRED openssl)
pkg_check_modules(JSONC REQUIRED json-c)
pkg_check_modules(MOSQUITTO REQUIRED libmosquitto)
pkg_check_modules(NFQUEUE REQUIRED libnetfilter_queue)
pkg_check_modules(BPF REQUIRED libbpf)

option(AW_DEBUG "Build debug" ON)
option(AW_WEBSSH "Build with web ssh support" OFF)
option(AW_FW3 "Build with fw3 support" OFF)

find_package(LibEvent)
if(NOT LibEvent_FOUND)
message(FATAL_ERROR "libevent2 not found!")
endif(NOT LibEvent_FOUND)
if (NOT AW_FW3)
pkg_check_modules(NFTNL REQUIRED libnftnl)
pkg_check_modules(MNL REQUIRED libmnl)
endif()

find_package(OpenSSL)
if(NOT OPENSSL_FOUND)
message(FATAL_ERROR "OpenSSL not found!")
endif(NOT OPENSSL_FOUND)
# Set installation directory
if(NOT DEFINED LIB_INSTALL_DIR)
set(LIB_INSTALL_DIR lib)
endif()

find_package(JSON-C REQUIRED)
include_directories(${JSON-C_INCLUDE_DIR})
if (AW_VPP)
# Add VPP includes and libraries (modified)
include_directories(${VPP_INCLUDE_DIR})
link_directories(${VPP_LIBRARY_DIR})

find_package(UCI REQUIRED)
include_directories(${UCI_INCLUDE_DIR})
find_library(VPPINFRA_LIB vppinfra PATHS ${VPP_LIBRARY_DIR})
find_library(VLIBMEMORYCLIENT_LIB vlibmemoryclient PATHS ${VPP_LIBRARY_DIR})
find_library(VLIBAPI_LIB vlibapi PATHS ${VPP_LIBRARY_DIR})
find_library(SVM_LIB svm PATHS ${VPP_LIBRARY_DIR})
find_library(VPPAPICLIENT_LIB vppapiclient PATHS ${VPP_LIBRARY_DIR})

if(LIB_INSTALL_DIR)
else()
set(LIB_INSTALL_DIR lib)
# Define VPP libraries to link
set(VPP_LIBS
${VPPINFRA_LIB}
${VLIBMEMORYCLIENT_LIB}
${VLIBAPI_LIB}
${SVM_LIB}
${VPPAPICLIENT_LIB}
)
endif()

# Include directories
include_directories(
${JSONC_INCLUDE_DIRS}
${UCI_INCLUDE_DIRS}
${LIBEVENT_INCLUDE_DIRS}
${OPENSSL_INCLUDE_DIRS}
${MOSQUITTO_INCLUDE_DIRS}
)

# Add subdirectories
add_subdirectory(src)
add_subdirectory(ebpf)
73 changes: 73 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
**7.10.2082 版本更新内容:**
1. **修复通过认证的用户信息不上报的bug**

2. **增加本地无认证服务器认证功能**
- 用户可手动配置本地portal展示页面
- 添加用户本地放行接口
- 优化无认证服务器下的ping,auth及ws接口流程

3. **websocket接口增加踢认证用户下线功能**:用户能马上踢下线,不用等1分钟

4. **优化logout,login及login2接口**

5. **本地http&https服务的优化**
- 增加IPv6的支持
- 修复https拦截认证的bug

6. **修复认证服务器在cdn环境下的bug**:认证服务器在cdn环境下ip会经常变动,导致认证服务器白名单的失效

7. **修复IPv6环境下认证失效的bug**

8. **修改网关获取不到IPv6地址退出的问题**

9. **websocket功能优化**
- 添加websocket单独配置功能,支持与认证服务器分开部署
- 优化websocket连接服务器端的容错处理
- 修复websocket连接服务器端退出的问题

10. **重构针对fw3和fw4的代码处理,停止对fw3的支持**

11. **当apfree wifidog启动时,清除已有会话,当用户下线后清除该用户的会话**

12. **修复完善防火墙规则**
- 防止非80,443端口服务无认证上网
- 保证网关设备可以无认证访问网络

13. **添加防火墙规则重启功能,并保留原有通过认证用户及其流量统计信息**

14. **修复一些其它bug**


**7.08.2035版本更新内容:**

1. **修复内存泄露问题**:修复了在HTTPS跳转过程中未释放URL内存的漏洞。

2. **多网关认证支持**
- 引入`device_id`作为设备唯一标识。
- 新增`gateway_setting`对象,每个对象可指定不同的认证模式,并通过`gateway_id`标识。
- 每个`gateway_setting`对象都有对应的通道(channel),支持不同的认证方式。
- `auth counter_v2`接口扩展,支持多网关认证。
- `ping`接口扩展,支持多网关认证。

3. **跳转URL生成逻辑修正**:根据HTTP或HTTPS协议动态设置`gw_port`,以确保服务匹配。

4. **IPv6支持**:增强防火墙规则,并全面支持IPv6地址。

5. **WebSocket模块更新及修复**
- 扩展心跳接口,增加所有网关信息的上报功能。
- 新增心跳回包处理机制,用于判断和调整网关的认证模式。
- 扩展`connect`接口,获取并初始化网关认证模式。
- 修复了当认证服务器离线时,WebSocket线程可能导致进程崩溃的Bug。

6. **支持WSS协议**

7. **优化QUIC协议处理**

8. **修复TLS连接问题**:增强对认证服务器HTTPS连接的支持。

9. **Popular Server添加**:增加对Google域名的支持。

10. **ping接口扩展**:更新`ping`接口以支持多网关认证功能。



56 changes: 56 additions & 0 deletions README-zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@

<div align="center">
<img src="https://user-images.githubusercontent.com/1182593/213065247-9a3cb0a5-dd08-4383-b217-b141ad32e88a.png" alt="ApFree WiFiDog Logo" width="400" height="400"/>
</div>

[![License](https://img.shields.io/badge/license-GPLV3-brightgreen.svg?style=plastic)](https://github.com/liudf0716/apfree_wifidog/blob/master/COPYING)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=plastic)](https://github.com/liudf0716/apfree_wifidog/pulls)
[![Issues Welcome](https://img.shields.io/badge/Issues-welcome-brightgreen.svg?style=plastic)](https://github.com/liudf0716/apfree_wifidog/issues/new)
[![Release Version](https://img.shields.io/badge/release-7.10.2082-red.svg?style=plastic)](https://github.com/liudf0716/apfree_wifidog/releases)
[![OpenWRT](https://img.shields.io/badge/Platform-%20OpenWRT%20-brightgreen.svg?style=plastic)](https://github.com/openwrt)
[![Join the QQ Group](https://img.shields.io/badge/chat-qq%20group-brightgreen.svg)](https://jq.qq.com/?_wv=1027&k=4ADDSev)

[English Version](README.md) | [中文版本](README-zh.md)

## ApFree WiFiDog: 高性能 HTTP(S) 认证门户解决方案

ApFree WiFiDog 是一个开源的高性能认证门户解决方案,专门用于在 OpenWrt 平台上对无线网络用户进行认证。它能够高效处理高并发和大量流量。

### 介绍视频

<div align="center">
<a href="https://www.bilibili.com/video/BV18m411d7Yj/?vd_source=b303f6e8e0ed18809d8752d41ab1de7d">
<img width="972" alt="ApFree WiFiDog 介绍视频" src="apfree-wifidog_intr.png">
</a>
</div>

### 为什么选择 ApFree WiFiDog?

1. **稳定性**:通过 API 基于 iptables 规则,在多线程环境中增强稳定性。
2. **性能**:基于 libevent2 和 epoll 支持,显著超越原版 WiFiDog。
3. **HTTPS 支持**:确保安全的 HTTPS 重定向,符合现代网络安全标准。
4. **长连接支持**:支持长连接,包括 WebSocket 和 MQTT,实现实时通信。
5. **灵活的认证方式**:提供本地和云端认证,满足不同用户需求。
6. **高级规则管理**:支持动态管理访问规则,包括 MAC 地址和 IP/域名,无需重启。

### LuCI 集成

为简化配置,ApFree WiFiDog 包含 LuCI 界面。您可以通过 [luci-app-apfree-wifidog 仓库](https://github.com/liudf0716/luci-app-apfree-wifidog) 轻松管理设置。

### 在云认证模式下使用 ApFree WiFiDog

要在云认证模式下运行 ApFree WiFiDog,您需要先建立一个认证服务器。设置完成后,通过在配置文件中指定服务器的 IP 地址或域名来配置 ApFree WiFiDog 连接到服务器。

#### 构建认证服务器

您可以使用 ApFree WiFiDog 开发者提供的官方服务器构建认证服务器,称为 WWAS。遗憾的是,WWAS 目前不再维护,因为我正在专注于维护一个名为 AWAS 的闭源版本。如果您需要帮助,请随时联系我以讨论私人服务选项。

**重要说明关于 SSL 证书**:重定向 HTTPS 请求时,认证门户提供的 SSL 证书可能会在客户端设备上触发不受信任的警告。这是认证门户解决方案的典型行为,用户可以安全地忽略该警告并继续操作。

### 如何贡献

我们欢迎您为 ApFree WiFiDog 贡献代码!您可以在我们的 [GitHub 仓库](https://github.com/liudf0716/apfree-wifidog) 上创建问题或提交拉取请求。请查看我们的 [CONTRIBUTING.md](https://github.com/liudf0716/apfree-wifidog/blob/master/CONTRIBUTING.md) 以确保您的贡献符合项目标准。

### 联系我们

加入我们的QQ群以进行讨论和支持:[331230369](https://jq.qq.com/?_wv=1027&k=4ADDSev).
Loading