46 Commits

Author SHA1 Message Date
Rob White
3a7ded7407 Walled Garden: autonomous operation
Signed-off-by: Rob White <rob@blue-wave.net>
2020-10-28 21:15:20 +00:00
Rob White
4d14888c0f Remove checkstyle from Makefile and travis.yml
Signed-off-by: Rob White <rob@blue-wave.net>
2020-06-23 20:19:40 +01:00
Rob White
576efcacd3 Generic Linux - install opennds.service
Move opennds.service to resources folder

Signed-off-by: Rob White <rob@blue-wave.net>
2020-06-23 12:24:43 +01:00
Rob White
a698f043b2 Install sitewide username/password splash support files
Signed-off-by: Rob White <rob@blue-wave.net>
2020-06-19 19:49:12 +01:00
Rob White
035f1a0980 Rename demo-preauth scripts and install all scripts
Signed-off-by: Rob White <rob@blue-wave.net>
2020-06-12 23:13:52 +01:00
Rob White
b78536aea1 Intial clone from nodogsplash master
Signed-off-by: Rob White <rob@blue-wave.net>
2020-04-05 08:21:01 +01:00
Rob White
965cbb8b9d Release 4.5.0
Changelog:
  * Add - Enable https protocol for remote FAS [bluewavenet]
  * Add - trusted devices list to ndsctl json output [bluewavenet]
  * Add - option unescape_callback_enabled [bluewavenet]
  * Add - get_client_token library utility [bluewavenet]
  * Add - utf-8 to PreAuth header [bluewavenet]
  * Add - PreAuth Support for hashed id (hid) if sent by NDS [bluewavenet]
  * Add - library script shebang warning for systems not running Busybox [bluewavenet]
  * Add - htmlentityencode function, encode gatewayname in templated splash page [bluewavenet]
  * Add - htmlentity encode gatewayname on login page (PreAuth) [bluewavenet]
  * Add - Simple customisation of log file location for PreAuth and BinAuth [bluewavenet]
  * Add - option use_outdated_mhd [bluewavenet]
  * Add - url-encode and htmlentity-encode gatewayname on startup [bluewavenet]
  * Add - Allow special characters in username (PreAuth) [bluewavenet]
  * Add - Documentation updates [bluewavenet]
  * Add - Various style and cosmetic updates  [bluewavenet]
  * Fix - Change library script shebang to bash in Debian [bluewavenet]
  * Fix - Remove unnecessary characters causing script execution failure in Debian [bluewavenet]
  * Fix - Add missing NULL parameter in MHD_OPTION_UNESCAPE_CALLBACK [skra72] [bluewavenet]
  * Fix - Script failures running on Openwrt 19.07.0 [bluewavenet]
  * Fix - Preauth, status=authenticated [bluewavenet]
  * Fix - Prevent ndsctl from running if called from a Binauth script. [bluewavenet]
  * Fix - Minor changes in Library scripts for better portability [bluewavenet]
  * Fix - Prevent php notices on pedantic php servers [bluewavenet]
  * Fix - broken remote image retrieval (PreAuth) [bluewavenet]
  * Fix - Allow use of "#" in gatewayname [bluewavenet]

Signed-off-by: Rob White <rob@blue-wave.net>
2020-03-03 21:44:05 +00:00
Rob White
a7ef01f413 Enable https protocol for remote FAS
Previously a remote FAS could not use https protocol without generating
browser security errors or warnings so NDS enforced use of http.

A new FAS level, fas_secure_enabled = 3 is introduced here.

Level 3 is the same as level 2 except the use of https protocol is
enforced for FAS. In addition, the "authmon" daemon is loaded.

This daemon allows the external FAS, after client verification is complete,
to effectively traverse inbound firewalls and address translation to
achieve NDS authentication without generating browser security warnings.
or errors.

A fully functional https fas script is provided (fas-aes-https.php).

Signed-off-by: Rob White <rob@blue-wave.net>
2020-02-29 16:50:07 +00:00
Rob White
546e870a44 debian: change library script shebang to bash
Signed-off-by: Rob White <rob@blue-wave.net>
2020-01-18 09:45:16 +00:00
Rob White
84594da947 Add get_client_token library utility
Signed-off-by: Rob White <rob@blue-wave.net>
2020-01-11 16:18:17 +00:00
Rob White
36f94f4972 Implement unescape callback for MHD (libmicrohttpd)
This is a fix to allow "+" and "&" characters in user data passed to MHD in get requests.
Reported in issue #476, this effected PreAuth and Binauth.
"+" and "&" characters can now be used in form data, eg passwords etc.

Signed-off-by: Rob White <rob@blue-wave.net>
2020-01-01 15:57:45 +00:00
Rob White
423e328fab fas: get the client interface connections.
When option fas_secure_enabled '2' is set, get the client interface connections.

The client interface connections string is of the form:
[localif] [remotemeshnodemac] [localmeshif]
This is added to the query string as "clientif".
[remotemeshnodemac] and [localmeshif] will be null if  the client is connected
to a local interface or 802.11s mesh networking is not active.

This can be used to change the response of the FAS captive portal login page,
depending on the interface the client is connected to.

Connections to local wireless interfaces and
remote 802.11s mesh node connections are detected.

Signed-off-by: Rob White <rob@blue-wave.net>
2019-12-29 21:48:18 +00:00
Rob White
3c40131333 Fix: Missing directory in Makefile
This does not effect OpenWrt as that has its own Makefile
2019-10-09 07:35:49 +01:00
Rob White
389f845061 Create option login_option_enabled
Allows simple switch between templated splash page and preauth login script.
Disabled:
option login_option_enabled '0'
use config options for FAS if set, or Templated Splash

Enabled:
option login_option_enabled '1'
use preauth login script providing username/email login with access log

Signed-off-by: Rob White <rob@blue-wave.net>
2019-10-06 16:27:24 +01:00
Rob White
664f986ce2 Add fasremotefqdn, faskey.
Simple configuration of fas running on remote shared hosting server.
Encrypt the query string sent to remote FAS.
Documentation Updates.
Bumping to v4.0.0

Signed-off-by: Rob White <rob@blue-wave.net>
2019-07-07 14:26:27 +01:00
Rob White
46fcec8d76 Include PreAuth Login script in package
Signed-off-by: Rob White <rob@blue-wave.net>
2019-04-04 12:01:08 +01:00
Moritz Warning
57f56dc28c gateway => main
Makes it easier to find the programs 'main' method.
2018-10-24 10:18:07 +02:00
Rob White
1ba43aec07 Add .css file, update splash and status html
Update comments embedded in splash.html.

Signed-off-by: Rob White <rob@blue-wave.net>
2018-09-05 11:54:44 +01:00
Moritz Warning
2c87c16533 enable optimization by default 2018-08-08 21:22:40 +02:00
Moritz Warning
188279304a infoskel.html => status.html 2018-08-05 01:17:08 +02:00
Moritz Warning
858d6eaa3b refactor code for future use 2018-08-04 20:07:41 +02:00
Moritz Warning
81c3ec69a3 makefile: fix deb target 2017-02-21 20:45:35 +01:00
Moritz Warning
151e712899 makefile: remove stray tab 2017-02-21 20:26:59 +01:00
Alexander Couzens
66ce5a2978 Makefile: add checkstyle
similiar to fixstyle, but doesn't change the source
and fails if it's not correct.
2016-11-21 14:47:56 +01:00
Alexander Couzens
b7d502fda7 Makefile: correct fixstyle
use if/then/else instead of && ||, add newline to improve readability
2016-11-21 14:47:55 +01:00
Alexander Couzens
8e0cf38078 Makefile: move libraries from LDFLAGS to LDLIBS 2016-06-02 12:00:54 +02:00
Alexander Couzens
6ed9f249aa Introduce new httpd library microhttpd
Supporting mimetypes, http 1.1
2016-06-02 12:00:54 +02:00
Alexander Couzens
13e27d7d37 implement string replace based template engine
The new template engine react in the same way as the old in libhttp
did.
2016-06-02 11:59:05 +02:00
Alexander Couzens
14e9f2b2f9 remove libhttpd
libhttpd will be replaced by microhttpd
2016-06-02 11:59:05 +02:00
Moritz Warning
a43d3ba576 Merge pull request #45 from smoe/debian_packaging
Improved Debian packaging
2015-01-04 05:28:00 +01:00
sayuan
08efc347e6 Merge pull request #32 from sayuan/master
Turn nodogsplash back to multi-thread
2015-01-02 22:30:21 +08:00
Steffen Moeller
66b05fa7e4 Improved Debian packaging 2014-12-27 00:50:03 +01:00
Steffen Möller
18afb32134 Correction for .deb source tarball creation
With apologies for my previous insufficient contribution - the source tarball now (as originally intended) extracts into a directory with the name of the package.
2014-12-26 23:13:50 +01:00
Moritz Warning
f1c9bb30e6 Merge pull request #41 from smoe/patch-1
Conditional strip of binaries (still default)
2014-12-26 21:35:37 +01:00
Steffen Möller
a25c31ece0 improving Makefile's deb target
Created cleaned (no remnants from previous builds, no .gitignore, no .git or dist folder) Debian source directory to prepare for upload to distribution.

Parsed VERSION from debian/changelog and have it as part of the Debian source tarball.
2014-12-26 17:51:56 +01:00
Steffen Möller
dc8944094a Conditional strip of binaries (still default)
The stripping of binaries also removes debug information that comes handy for interpreting a core dump. Linux distributions have means to separate that information into separate files, then shipping in a separate -dbg package.
2014-12-26 17:10:26 +01:00
sayuan
bea0bdfa97 Revert "stop using multiple threads to handle HTTP requests"
This reverts commit b4d4d31843.
2014-10-21 12:00:54 +08:00
sayuan
5dafd901f8 add a target deb of Makefile to build debian package 2013-09-01 22:09:05 +08:00
Etienne CHAMPETIER
0398da2ff5 Add "make fixstyle" target, make travis use it 2013-08-30 13:45:35 +02:00
sayuan
d0c2141b54 let Makefile support DESTDIR
Follow the GNU makefile conventions.
This also make the building of the Debian package much easier.
2013-08-26 00:39:26 +08:00
sayuan
b4d4d31843 stop using multiple threads to handle HTTP requests
LibHTTPD doesn't support multi-threading at all.  Some static variables,
for example `buf` in `httpdReadRequest`, is shared by all threads.

These cause a lot of unexpected behaviors and sgefaults.
However there are also some patches trying to solve it:
  http://dev.wifidog.org/ticket/471 .

Those patches reduce the chance that cause NoDogSplash to crash, but
the bug still exists.

There are two ways to solve it.  One is to remove the `static` modifier and
to bring more overhead to each request.  Another solution is to not use
threads at all.

I prefer the later one.  Since all requests can be handled very quickly,
I believe that won't increase the response time even if a lot of users
try to access it at the same time.
2013-08-10 16:33:05 +02:00
sayuan
5782728481 changed -lpthread to -pthread of LDFLAGS
For the newer version of GCC, the placement of -l option does matter,
and it cannot compile successfully now. Libraries must be specified
after the objects in the linking command.

Also, there is another option -pthread which seems more preferred.
2013-08-10 16:33:05 +02:00
Jo-Philipp Wich
0ec420f242 Preserve internal CFLAGS and LDFLAGS that should not be overwritten by the OpenWrt toolchain 2013-08-10 12:43:49 +02:00
Jo-Philipp Wich
d07f4b75b5 Do not override flags set through the environment. Useful for OpenWrt. 2013-08-10 12:43:49 +02:00
Moritz Warning
47d274ecaf remove fhonour-copt and more cleanup 2013-08-10 12:43:49 +02:00
Moritz Warning
3638f6dcb7 and Makefile and fix build 2013-04-30 05:53:54 +02:00