Wifidog的協議梳理

來源:互聯網
上載者:User

wifidog的認證流程圖:


1· 使用者串連WIFI會跳轉到以下地址:

http://auth_server/login?gw_id=[GatewayID, default: "default"]gw_address=[GatewayAddress, internal IP of router]gw_port=[GatewayPort, port that wifidog Gateway is listening on]url=[user requested url]auth_server #即認證的網域名稱gw_id #配置的網關名稱gw_address #回調的內網地址gw_port #回調的連接埠在這個階段需要返回登入的頁面,即授權的首頁,並且需要將所有涉及跳轉的第三方地址加入白名單。

2· 當驗證使用者身份之後,即使用者登入成功之後重新導向到網關地址

http://GatewayIP:GatewayPort/wifidog/auth?token=[auth token]auth token #系統為使用者產生的token

3· 網關地址接受到訊息後,會周期的發送使用者資訊,並確認是不是允許繼續網路訪問 請求地址

http://auth_server/auth/index.php?stage=countersip=mac=token=incoming=outgoing=ip,mac,token為使用者的基本資料,incoming/outgoing為使用者的串連計數資訊,用來限定使用者是否可以繼續串連此時auth_server需要返回該請求:0——拒絕,刪除防火牆內使用者以及使用者的資訊6——使用者驗證失敗,逾時,會刪除防火牆內資訊(即會重新要求登入)1——使用者驗證通過,並跳轉到http://auth_server/portal/?gw_id=%s5——使用者需要驗證,允許規則內的訪問進行驗證-1——使用者驗證出錯,使用者可以繼續訪問網路返回資料格式:Auth: <number from user status list>如Auth: 1 #中間有個空格

4· 系統會周期性發送心跳包,用來確認網關驗證和證明伺服器的正常工作請求地址

http://auth_sever/ping/?gw_id=%ssys_uptime=%lusys_memfree=%usys_load=%.2fwifidog_uptime=%luauth_server此時需要返回“Pong”可以通過該心跳包來監控整個認證的工作





聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.