Git Product home page Git Product logo

unifi-hotspot's Introduction

unifi-hotspot

The purpose of this repo is to provide a flexible, Node.js based external portal server for authorising Wi-Fi guests on Unifi products. Out of the box is currently support storing user information in Google Sheets or posting it via a webhook.

What's new in V2

BREAKING CHANGES

  • The USERNAME environment variable has been renamed to UNIFI_USER
  • The PASSWORD environment variable has been renamed to UNIFI_PASS
  • Changed basic value for AUTH_ENV to userInfo

Features and Improvements

  • Bumped to NodeJS Version 18
  • Removed request and request-promise packages in favour of axios
  • Rewritten authorisation controller
  • ๐ŸŽ‰ Store the contents of the hotspot form using LOG_AUTH drivers ๐ŸŽ‰
  • Listen on port given in env

Documentation

Documentation

unifi-hotspot's People

Contributors

dependabot[bot] avatar diorgesl avatar woodjme avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unifi-hotspot's Issues

error

docker: Error response from daemon: driver failed programming external connectivity on endpoint elastic_burnell (bbb96e9369be6119024bb5ccfc223fdf92b2a06ecc70c88e1f0397e389a608f5): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use.

Can't get working on Synology

I have Docker on my Synology and installed this container but can't access it. Tried using the Synology IP with the port 4545 locally.

Question Basic.html not saving name and email

Hi,
I new to node.js and express.
I had successfully run the service and able to use basic.html and get authorise to Unifi guest access.

may I know which section authorise.js I should place :

// Insert data into database table
let post = {name: 'joe', mobile: '81234567', email: '[email protected]'};
let sql = 'INSERT INTO free_wifi SET ?';
let query = db.query(sql, post, (err, result) => {
if (err) throw err;
console.log(result);
res.send('1 row data added...');
});

I am trying to save the name, mobile and email in form to mysql.

I am able to test connect to mysql successful:

const mysql = require('mysql')

// Create MySQL Connection
const db = mysql.createConnection({
host: "10.0.0.1",
user: "dbuser",
password: "dbpassword",
database: "dbname"
});

// Connect MySQL
db.connect((err) => {
if (err){
throw err;
}
console.log("Database Connected!");
});

Thank you.

Feature Request: Portal Requires Users to Fill a Form & Logo Customization

Hi Jamie,

As discussed I'm working on a project in which it is required that users fill a form containing fields like Name, Email, Phone, ID, etc before they are allowed to use WiFi. This information will then be saved into an online database (like Google Sheets or SQL) after validation of fields filled by a user.

Also, another common feature required by users is to be able to change the background of portal page or add their company's logo to it.

Could you please consider adding these features to this project? They are very commonly required and would help many people.

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.