Coder Social home page Coder Social logo

ldoming / espresso-portal Goto Github PK

View Code? Open in Web Editor NEW

This project forked from emanuelepaiano/espresso-portal

0.0 2.0 0.0 4.88 MB

FreeWifi PHP Portal for ubiquiti controller

License: MIT License

PHP 80.77% HTML 15.49% CSS 2.04% JavaScript 1.70%

espresso-portal's Introduction

ESPRESSO PHP PORTAL v0.9

FreeWifi PHP Captive Portal, useful for builds coffee or restaurants free hotspots without pay external cloud services. Works with Ubiquiti Unifi controller v4.X and v5.X

alt tag

NOTE: This captive portal actually works, but it's under development. There is only frontend and I'm coding a jquery-mobile backend for administrate database.

WARNING: Some countries' laws, require a logging data for guests activities from wifi hotspots. This tool does not collect any data or logs, so use it at your risk. If required in your country, install a logging system by yourself. I'm not responsible for law violations!

FEATURES

  • Mac address/email authentication for free limited-time wifi access;
  • Registered users authentication (support limited time login from single mac address);
  • Remaining time counter for users (you can show them fake values, hiding minutes from remaining time);
  • Blocking expired session's mac-address for minutes (or hours / days);
  • Multilanguage and language browser detection (italian/english);
  • Single customizable frontend theme.
  • Mail login supports for guests, with logging useful for signing up to newsletters - NEW
  • Disabling registered users login (set hotspot for guests only) - NEW
  • Permanent login support - NEW

REQUIREMENTS

  • Ubiquiti Unifi Controller (tested on 4.8.20 version)
  • Linux Debian or Windows Lamp (tested on Debian and Raspbian 8)
  • Nginx or Apache2 webserver with php enabled
  • Sqlite3 or Mysql 5.5 server
  • PHP 5.5 with mysql and/or sqlite3 PDO support
  • PhpMyAdmin or external database client for backend [OPTIONAL]

INSTALL

  1. Prepare your system installing the unifi controller, a web server (Nginx/Apache) with PHP/PDO CURL and a DBMS (Mysql or Sqlite3);

  2. Put guest/ directory into webserver root (like /var/www/html) and change permissions to access www-data webserver user;

  3. To increase security, move guest/s/default/db/hotspot.sqlite and hotspot.sql files to another path (like /var) inaccessible from web, but accessible from php;

  4. Edit guest/s/default/config.inc.php Unifi Controller options, database settings and $GLOBALS['sessionLogging'] with random string.

  5. If you use mysql, import hotspot.sql file into database (you can use PhpMyAdmin). If you prefer sqlite, set $GLOBALS['dbms']='sqlite' and $GLOBALS['sqliteFile'] to hotspot.sqlite file. For backend you can use sqliteweb (https://github.com/coleifer/sqlite-web).

  6. Log in in Unifi Controller and set External Hotspot (from Guest Policies) to redirect to custom captive ip address.

  7. All access will be logged into access_logs database table (set $GLOBALS['logAccessEnabled']) to false for disabling logging)

  8. Set $GLOBALS['GuestMailAccess'] to true to enable guest authentication by email address (useful for signing up to newsletter)

  9. Set $GLOBALS['showHomeRegistered'] to false to hide disable registered accounts (guest only)

  10. Enjoy


LICENSE

This tool is released under MIT License


CREDITS

This Captive Portal is based on


FUTURE RELEASES

I'm working for Linux ready hotspot distro with Espresso Frontend and Espresso-Admin. Will be available for Raspberry Pi 2-3 and X86/x64 platforms.

ESPRESSO-ADMIN BACKEND (works only with mysql!)

alt tag

Download Espresso-admin

AUTHOR

Emanuele Paiano - nixw0rm [at] gmail [dot] com


SUPPORT ME

If you like this project, consider a little donation, so I can buy new hardware for testing and development. At least you can offer me a coffee.. :)

paypal


espresso-portal's People

Contributors

emanuelepaiano avatar

Watchers

James Cloos avatar Lymuel 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.