Code Monkey home page Code Monkey logo

wifidog-ng's Introduction

WifiDog-ng

Next generation WifiDog

WifiDog-ng is a very efficient captive portal solution for wireless router which with embedded linux(LEDE/Openwrt) system.

Keep Watching for More Actions on This Space

Features

  • Use epoll - Based on libubox: Single threaded, Fully asynchronous, No blocking operation at all
  • Writing kernel module to implement authentication management instead of using iptables to create firewall rules
  • Support HTTPS: OpenSSL, mbedtls and CyaSSl(wolfssl)

Dependencies

How to use

add new feed into "feeds.conf.default":

src-git libuhttpd https://github.com/zhaojh329/libuhttpd-feed.git
src-git wifidog https://github.com/zhaojh329/wifidog-ng-feed.git

Install wifidog-ng packages:

./scripts/feeds update libuhttpd wifidog
./scripts/feeds install -a -p wifidog

Select package wifidog-ng in menuconfig and compile new image.

Network  --->
    Captive Portals  --->
        <*> wifidog-ng-mbedtls.................................... wifidog-ng (mbedtls)
        < > wifidog-ng-nossl....................................... wifidog-ng (NO SSL)
        < > wifidog-ng-openssl.................................... wifidog-ng (openssl)
        < > wifidog-ng-wolfssl.................................... wifidog-ng (wolfssl)

UCI Config options

Section gateway

Name Type Required Default Description
enabled bool no 0 Whether to enable wifidog
ifname interface no br-lan Interface to listen by wifidog
port port number no 2060 port to listen by wifidog
ssl_port port number no 8443 ssl port to listen by wifidog
checkinterval seconds no 30 How many seconds should we wait between timeout checks. This is also how often the gateway will ping the auth server and how often it will update the traffic counters on the auth server.
temppass_time seconds no 30 Temporary pass time
client_timeout seconds no 5 Set this to the desired of number of CheckInterval of inactivity before a client is logged out. The timeout will be INTERVAL * TIMEOUT

Section authserver

Name Required Default
host yes no
port no 80
path no /wifidog
login_path no login
portal_path no portal
msg_path no gw_message.php
ping_path no ping
auth_path no auth

Protocol

Gateway heartbeating (Ping Protocol)

http://authserver/wifidog/ping?gw_id=xx&sys_uptime=xx&sys_memfree=xx&sys_load=xx&wifidog_uptime=xx

To this the auth server is expected to respond with an http message containing the word "Pong".

Login

http://authserver/wifidog/login?gw_address=xx&gw_port=xx&gw_id=xx&ip=xx&mac=xx&ssid=xx&url=xx

Auth

http://gw_address:gw_port/wifidog/auth?token=xx

Auth confirm

http://authserver/wifidog/auth?stage=login&ip=xx&max=xx&token=xx&incoming=xx&outgoing=xx

The response of the auth server should be "Auth: 1" or "Auth: 0"

Counters (POST)

http://authserver/wifidog/auth/?stage=counters&gw_id=xx

{
    "counters":[{
        "ip": "192.168.1.201",
        "mac": "xx:xx:xx:xx:xx:xx",
        "token": "eb6d8d7f5ad6f35553a40f66cd2bff70",
        "incoming": 4916,
        "outgoing": 20408
    }, {
        "ip": "192.168.1.202",
        "mac": "xx:xx:xx:xx:xx:xx",
        "token": "eb6d8d7f5ad6f35553a40f66cd2bff70",
        "incoming": 4916,
        "outgoing": 20408
    }]
}

The response of the server should be:

{
    "resp":[{
        "mac": "0c:1d:ff:c4:db:fc",
        "auth": 1
    }, {
        "mac": "0c:1d:cf:c4:db:fc",
        "auth": 0
    }]
}

Temporary pass

http://gw_address:gw_port/wifidog/temppass?script=startWeChatAuth();

Contributing

If you would like to help making wifidog-ng better, see the CONTRIBUTING.md file.

wifidog-ng's People

Watchers

James Cloos avatar Chokri B.A. avatar

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.