-
Notifications
You must be signed in to change notification settings - Fork 116
Cap3.1 on NGINX and Python 3 [Captive Portal] #2070
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 20 commits
Commits
Show all changes
223 commits
Select commit
Hold shift + click to select a range
e4a6df9
bring cp changes on top of current HEAD
georgejhunt 18a485c
make-cp-servers writes directly to /etc/nginx/sites-enabled
georgejhunt da38382
dispersed changes
georgejhunt 7c5127e
fixes for moving invokation to 9
georgejhunt 931cab4
link to config that exists, py3 in capture-wsgi.py, get systemd unit …
georgejhunt ea641ba
so many errors, systemd still not working -- which uwsgi as root does
georgejhunt e10df5d
get the uwsgi path correct
georgejhunt dae30fa
fix for braces in python3
georgejhunt f6b093d
use copy rather than template for uwsgi file with double braces
georgejhunt 3f29a14
typo formmat
georgejhunt e3c7e8f
clean up logging
georgejhunt 090e2c4
fixed the android sign in to server disapperance
georgejhunt e88029c
return byte string in home_selected
georgejhunt 53f31b3
nginx - merge usb-lib.conf, modules.conf into iiab.conf
jvonau 383f619
nginx - moved to iiab-admin-console
jvonau 1e47300
nginx - restore iiab_home_url
jvonau 15db4a6
nginx - clean stale conf files
jvonau 57329d9
do not put uwsgi ini file in apps-enabled
georgejhunt 8ad3f76
remove commented out lines
georgejhunt 85577aa
need capture-wsgi as template to soft code port
georgejhunt 32b3753
Create README.md
georgejhunt ee6c42e
Update README.md
georgejhunt ac80caa
remove unused file
georgejhunt ed3b044
remove the copy of removed file
georgejhunt 0d6e236
MediaWiki 1.33.1 -> 1.34.0
holta 8ae4e6b
Merge pull request #2071 from holta/mediawiki-1.34.0
holta 4932263
jvonau suggested changes
georgejhunt b55d540
Merge pull request #2068 from jvonau/home_page
holta 104611f
Calibre-Web 0.6.4 -> master
holta f79ce9d
Merge pull request #2072 from holta/calibre-web-master
holta 0a3f906
bring cp changes on top of current HEAD
georgejhunt 778d9fd
make-cp-servers writes directly to /etc/nginx/sites-enabled
georgejhunt 652cb4d
dispersed changes
georgejhunt 30e726d
fixes for moving invokation to 9
georgejhunt f699f20
link to config that exists, py3 in capture-wsgi.py, get systemd unit …
georgejhunt 3bdcf43
so many errors, systemd still not working -- which uwsgi as root does
georgejhunt 7151477
get the uwsgi path correct
georgejhunt 312e249
fix for braces in python3
georgejhunt cd8df27
use copy rather than template for uwsgi file with double braces
georgejhunt cd0b295
typo formmat
georgejhunt 638b6f4
clean up logging
georgejhunt b97b1c5
fixed the android sign in to server disapperance
georgejhunt c38e718
return byte string in home_selected
georgejhunt 925a593
do not put uwsgi ini file in apps-enabled
georgejhunt 81f2807
remove commented out lines
georgejhunt a6c9685
need capture-wsgi as template to soft code port
georgejhunt c1c3c03
Create README.md
georgejhunt b302774
Update README.md
georgejhunt ac6619a
remove unused file
georgejhunt 85a0ced
remove the copy of removed file
georgejhunt 21c989b
jvonau suggested changes
georgejhunt a5ac224
Merge pull request #321 from iiab/master
holta 79e1bb1
http://box shouldn't redirect to http://box//home/
holta ce03dba
Merge branch 'cap3.1' of https://github.com/georgejhunt/iiab into cap3.1
georgejhunt 7dae9c1
Merge pull request #2074 from holta/nginx-home-page-double-slash
holta 5ebcb46
nodejs_version: 10.x -> 12.x
holta e342d0a
Merge pull request #2075 from holta/node-12
holta 118e438
Mandate Node.js 12.x for Sugarizer
holta 093a194
Update install.yml
holta 03f297e
Merge pull request #2076 from holta/sugarizer-req-node-12
holta d0ed8b1
get the changes tied down a little
georgejhunt afc2147
let python declare log file location
georgejhunt e6ef953
bring cp changes on top of current HEAD
georgejhunt e35610a
make-cp-servers writes directly to /etc/nginx/sites-enabled
georgejhunt ecf1b90
dispersed changes
georgejhunt 5c9354d
fixes for moving invokation to 9
georgejhunt 04eca5c
link to config that exists, py3 in capture-wsgi.py, get systemd unit …
georgejhunt 23f6b68
so many errors, systemd still not working -- which uwsgi as root does
georgejhunt b93445d
get the uwsgi path correct
georgejhunt 6bd48b1
fix for braces in python3
georgejhunt 93e66a1
use copy rather than template for uwsgi file with double braces
georgejhunt d488494
typo formmat
georgejhunt 7afed90
clean up logging
georgejhunt 34783ed
fixed the android sign in to server disapperance
georgejhunt 2bdca73
return byte string in home_selected
georgejhunt 8d32e2f
do not put uwsgi ini file in apps-enabled
georgejhunt bf76b47
remove commented out lines
georgejhunt 8a36fcd
need capture-wsgi as template to soft code port
georgejhunt 004f1fe
Create README.md
georgejhunt 40a56dc
Update README.md
georgejhunt 81d0325
remove unused file
georgejhunt d3f44dd
remove the copy of removed file
georgejhunt bda6e18
jvonau suggested changes
georgejhunt de6e1bb
bring cp changes on top of current HEAD
georgejhunt faa8132
make-cp-servers writes directly to /etc/nginx/sites-enabled
georgejhunt de81bba
fixes for moving invokation to 9
georgejhunt 76e79f5
link to config that exists, py3 in capture-wsgi.py, get systemd unit …
georgejhunt 30c2eeb
so many errors, systemd still not working -- which uwsgi as root does
georgejhunt 7855438
get the uwsgi path correct
georgejhunt 68886b6
fix for braces in python3
georgejhunt 533ee7b
use copy rather than template for uwsgi file with double braces
georgejhunt 6cfa332
typo formmat
georgejhunt 3bf9b2d
clean up logging
georgejhunt 763a252
fixed the android sign in to server disapperance
georgejhunt 60bd25a
do not put uwsgi ini file in apps-enabled
georgejhunt ccacb6f
remove commented out lines
georgejhunt 50ea405
need capture-wsgi as template to soft code port
georgejhunt 29c54a3
Create README.md
georgejhunt e9e41f7
Update README.md
georgejhunt 8de6c08
remove unused file
georgejhunt af29712
remove the copy of removed file
georgejhunt 37ac9c7
jvonau suggested changes
georgejhunt c728ce4
get the changes tied down a little
georgejhunt 4ff8d91
let python declare log file location
georgejhunt 10289e0
one more splash
georgejhunt 40e8106
resolve conflict
georgejhunt 1ffc2aa
turn off logging for uwsgi
georgejhunt 18d253c
center splash for macOS
georgejhunt 445a509
softcode landing page
georgejhunt baba718
remove mods to etc.hosts
georgejhunt 25ee1b7
home_selected needs content-length, comma in wrong place
georgejhunt 3614252
clean out ANDROID_TRIGGERED
georgejhunt 08dbbbf
make the home_selected ajax call async:false
georgejhunt 730ada8
Merge pull request #322 from iiab/master
holta 643e5ee
phpMyAdmin 4.9.2 -> 5.0.0
holta 7508b77
Merge pull request #2081 from holta/phpmyadmin-5.0.0
holta 52040ef
Moodle 3.7.x -> 3.8.x
holta b6cc93c
Merge pull request #2085 from holta/moodle-3.8.x
holta 374c63c
convert wp to native nginx
tim-moody f9adf21
add mediawiki in native nginx
tim-moody cdef90d
comment out wp and mw from proxy list
tim-moody 35ac04e
fix glitch in osm-vector-maps-nginx.conf
tim-moody 5464f91
fix awstats redirect to cgi without host
tim-moody 131bff8
change dokuwiki url
tim-moody 2888640
kalite - setup.yml needs kalite_install boolean
jvonau e4eda59
formatting
tim-moody 7361826
Merge pull request #2086 from tim-moody/nginx-conf2
holta a9e8e3d
Merge pull request #2087 from jvonau/ka-setup
holta a523477
Lokole 0.5.3 -> 0.5.4
holta 34bf528
Merge pull request #2088 from holta/lokole-0.5.4
holta 2f8636f
bring cp changes on top of current HEAD
georgejhunt a3f7be3
make-cp-servers writes directly to /etc/nginx/sites-enabled
georgejhunt fc6c055
dispersed changes
georgejhunt ca08c44
fixes for moving invokation to 9
georgejhunt a7d5520
link to config that exists, py3 in capture-wsgi.py, get systemd unit …
georgejhunt fdb872d
so many errors, systemd still not working -- which uwsgi as root does
georgejhunt 9127dfe
get the uwsgi path correct
georgejhunt f3a8971
fix for braces in python3
georgejhunt 749c1ac
use copy rather than template for uwsgi file with double braces
georgejhunt e7f0a1c
typo formmat
georgejhunt fb2722f
clean up logging
georgejhunt 240012f
fixed the android sign in to server disapperance
georgejhunt 225aa2e
return byte string in home_selected
georgejhunt b7ea45f
do not put uwsgi ini file in apps-enabled
georgejhunt 1b5f20f
remove commented out lines
georgejhunt 851c91e
need capture-wsgi as template to soft code port
georgejhunt 54c3320
Create README.md
georgejhunt 4007284
Update README.md
georgejhunt 9c8c50b
remove unused file
georgejhunt dbb9e79
remove the copy of removed file
georgejhunt ccae50a
jvonau suggested changes
georgejhunt 3f3732f
bring cp changes on top of current HEAD
georgejhunt 9a051f4
make-cp-servers writes directly to /etc/nginx/sites-enabled
georgejhunt 8a32233
fixes for moving invokation to 9
georgejhunt abb2b9d
link to config that exists, py3 in capture-wsgi.py, get systemd unit …
georgejhunt 8af95a3
so many errors, systemd still not working -- which uwsgi as root does
georgejhunt e8cf112
get the uwsgi path correct
georgejhunt a696c8a
fix for braces in python3
georgejhunt f0e7195
use copy rather than template for uwsgi file with double braces
georgejhunt 4c0821a
typo formmat
georgejhunt 19b51cc
clean up logging
georgejhunt d4a9bd7
fixed the android sign in to server disapperance
georgejhunt 3eba297
do not put uwsgi ini file in apps-enabled
georgejhunt c1744af
remove commented out lines
georgejhunt 4e48d2b
need capture-wsgi as template to soft code port
georgejhunt 8d018f6
Create README.md
georgejhunt aa04891
Update README.md
georgejhunt d3f6df8
remove unused file
georgejhunt 21cd58e
remove the copy of removed file
georgejhunt a2a13a3
jvonau suggested changes
georgejhunt 4a3f4af
get the changes tied down a little
georgejhunt 9277a96
let python declare log file location
georgejhunt c69dd15
bring cp changes on top of current HEAD
georgejhunt f4ee8fd
make-cp-servers writes directly to /etc/nginx/sites-enabled
georgejhunt 059dcc6
dispersed changes
georgejhunt e15daa1
fixes for moving invokation to 9
georgejhunt 5614241
link to config that exists, py3 in capture-wsgi.py, get systemd unit …
georgejhunt 447caea
so many errors, systemd still not working -- which uwsgi as root does
georgejhunt 49e4b9e
get the uwsgi path correct
georgejhunt 5804b59
fix for braces in python3
georgejhunt 44c71f2
use copy rather than template for uwsgi file with double braces
georgejhunt dfed97b
typo formmat
georgejhunt bff3c06
clean up logging
georgejhunt 96cfed0
fixed the android sign in to server disapperance
georgejhunt dd4d011
do not put uwsgi ini file in apps-enabled
georgejhunt c4023b8
remove commented out lines
georgejhunt 96493cb
need capture-wsgi as template to soft code port
georgejhunt 8ac12c6
Create README.md
georgejhunt b6a048e
Update README.md
georgejhunt 80c2f45
remove unused file
georgejhunt 4325082
remove the copy of removed file
georgejhunt 615c378
jvonau suggested changes
georgejhunt 3540e0c
bring cp changes on top of current HEAD
georgejhunt 885e39e
make-cp-servers writes directly to /etc/nginx/sites-enabled
georgejhunt e1962b5
fixes for moving invokation to 9
georgejhunt 785c047
link to config that exists, py3 in capture-wsgi.py, get systemd unit …
georgejhunt 32e26fb
so many errors, systemd still not working -- which uwsgi as root does
georgejhunt 5751235
get the uwsgi path correct
georgejhunt 518436b
fix for braces in python3
georgejhunt 4c5b504
use copy rather than template for uwsgi file with double braces
georgejhunt 163c652
typo formmat
georgejhunt 6ed76a9
clean up logging
georgejhunt a2c2520
fixed the android sign in to server disapperance
georgejhunt d0d5783
do not put uwsgi ini file in apps-enabled
georgejhunt c850b6d
remove commented out lines
georgejhunt e848e0a
need capture-wsgi as template to soft code port
georgejhunt 66e9e22
Create README.md
georgejhunt 677ba15
Update README.md
georgejhunt 4acc22d
remove unused file
georgejhunt b10be9c
remove the copy of removed file
georgejhunt caf1a25
jvonau suggested changes
georgejhunt 6998f0c
get the changes tied down a little
georgejhunt 1e6f3de
let python declare log file location
georgejhunt 74fb1a0
one more splash
georgejhunt a506b30
turn off logging for uwsgi
georgejhunt c5dc744
center splash for macOS
georgejhunt 67aa4f1
softcode landing page
georgejhunt 44b0632
remove mods to etc.hosts
georgejhunt e8d4cec
home_selected needs content-length, comma in wrong place
georgejhunt 008ae5d
clean out ANDROID_TRIGGERED
georgejhunt 60b0a09
make the home_selected ajax call async:false
georgejhunt 8c8e30d
Merge branch 'cap3.1' of https://github.com/georgejhunt/iiab into cap3.1
georgejhunt e9b9a5c
windows7 workds
georgejhunt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
roles/captive-portal/templates/captive-portal.service.j2.deprecated
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| ## Theory of Operation | ||
|
|
||
| * The captive portal function is a feature of most modern operating systems. With the increased use of https/ssl (secure sockets layer), the automatic diversion to a specific web page runs the risk of being detected as a "man in the middle" attack. | ||
| * Each Operating System (OS) provides a mechanism that IIAB can use to break into a conversation, when SSL is not being used. This is an initial attempt by the OS to talk to one of its own web sites, to determine if the host os is connected to the internet. It is always performed without SSL. | ||
| * The IIAB captive portal uses a list of these OS supported web sites, and diverts these requests to the IIAB server, which in turn forwards to the IIAB home page. | ||
|
|
||
| ## Components of the IIAB Captive Portal | ||
|
|
||
| * Files used | ||
| 1. checkurls -- the list of urls use by at least one of the OS's. | ||
| 1. iiab-divert-to-nginx -- Bash script writes dnsmasq config file which points to IIAB server | ||
| 1. iiab-make-cp-servers.py -- Python script writes nginx configuration file to /etc/nginx/sites-enabled | ||
| 1. capture-wsgi.py -- the script which determines the client agent, records it in sqlite database, and responds with redirects as appropriate for each OS. | ||
| 1. uwsgi-captiveportal.service -- systemd unit file which runs uwsgi which makes capture-wsgi.py available on port 9090. | ||
|
|
||
| ## Extending and Debugging Captive Portal | ||
| * The python capture script can be run interactively in terminal (use systemctl stop uwsgi-captiveportal to free up the port). This will expose any python errors easily. | ||
| * Run the capture-wsgi.py with "-l" in a terminal to increase logging to /var/log/apache2/portal.log | ||
| * To discover untrapped urls, "apt-get install tcpdump", and "tcpdump -i br0 capture.tcp". I transfer this file to a machine with a GUI, and wireshark to interpret the conversations on the wire. The DNS packets are the ones to look for. | ||
|
|
||
| ## Known Problems | ||
| 1. On Android 5-7, the browser which is brought up, during the association process, is a 'walled garden' and I cannot find a way out. This browser is not very modern, and continuously displays the "sign in to Wi-Fi network" button -- with an annoying beep. | ||
| 2. On Windows 7, the default Internet Explorer (version 11) does not display the home page correctly. (but chrome, and firefox do). |
2 changes: 1 addition & 1 deletion
2
roles/captive-portal/defaults/main.yml → roles/captiveportal/defaults/main.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| # captive_portal_install: False | ||
| # captive_portal_enabled: False | ||
|
|
||
| # captive_portal_port: 9090 | ||
| # captiveportal_port: 9090 | ||
|
|
||
| # All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml | ||
| # If nec, change them by editing /etc/iiab/local_vars.yml prior to installing! |
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.