Open holta opened 6 years ago
Tests: Tests S9+ Android 8 • connect to IIAB ssid • takes awhile • says internet may not be available • did not get splash page • did not get redirected
Tests S6 Android 7 • No security on ssid • Connected to ssid • Got splash screen with SIGN IN TO WI-FI NETWORK • Two links: • Click first to get browser we need • Then click to go to home page • I clicked first • I get ssl cert not trusted • Refreshes but looks like same page with SIGN IN message and two links • Clicked second link • Took me to wifi page and now says Internet in a Box with status connected • But didn’t take me to home page • Took an internet link and does not reach it • Put box.lan in url • It tries to search Cleared chrome cache and tried again • Connected • Signin message popped up briefly then when to another ssid • Clicked second link without first and got same as above after ‘clicked second’ • Never get to home page • Now I get internet may not be available messages Reboot for one last try • Still just get message about internet may not be available • Forget network • Now get splash • Click first link • I get ssl cert not trusted • Refreshes but looks like same page with SIGN IN and two links • Clicked second link • Back to wifi screen but says signed in • Never got to home page
Tim, Reading through the log that you sent to me, I see stuff that I've never seen before. Would you try the following: "unlink /etc/apache2/sites-enabled/captive-portal.conf" "ln -sf /etc/apache2/sites-available/captive-portal.conf /etc/apache2/sites-enabled/001-captive-portal.conf" and then "systemctl restart apache2"
I think I was confused about apache config file precedence, but I need apache2 to handle the hosts that are not in my target list of urls (and the last <virtual_host *:80> seems to win.
I tried the above with no change in how Android 7 on Galaxy S6 behaves.
OK missed "unlink /etc/apache2/sites-enabled/captive-portal.conf"
I've commented out the put_204 for android, and made the default response be 404. I left the capture server running with the -l flag inside of a screen instance. Can you try it again? Thanks
Another test of S9+ android 8 • Connected to ssid • Splash popped up • Clicked top link • Got same page still with SIGN IN TO WIFI • Clicked bottom link • Went to home page but still has SIGN IN TO WIFI • In vertical ellipsis menu there is an 'open in browser' option on each of the SIGN IN TO WIFI screens • Clicking it takes me to splash, but I think I now have chrome as the ellipsis menu has a full set of options • Now if I take the second link I get to the home page without SIGN IN TO WIFI
This suggests to me that there is no value in sending me to the splash page. You could just send me to the home page and I could use the 'open in browser' option to get a real browser
Are you thinking that we would change the home page to instruct the user to click on the ellipsis, and click on the "open in Browser" for all platforms? How would that work?
On Tue, Oct 30, 2018 at 11:37 AM Tim Moody notifications@github.com wrote:
Another test of S9+ android 8 • Connected to ssid • Splash popped up • Clicked top link • Got same page still with SIGN IN TO WIFI • Clicked bottom link • Went to home page but still has SIGN IN TO WIFI • In vertical ellipsis menu there is an 'open in browser' option on each of the SIGN IN TO WIFI screens • Clicking it takes me to splash, but I think I now have chrome as the ellipsis menu has a full set of options • Now if I take the second link I get to the home page without SIGN IN TO WIFI
This suggests to me that there is no value in sending me to the splash page. You could just send me to the home page and I could use the 'open in browser' option to get a real browser
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/iiab/iiab/issues/1182#issuecomment-434417508, or mute the thread https://github.com/notifications/unsubscribe-auth/AB04HJZDtOi1idh681PZMcAWoX8uepP9ks5uqJx1gaJpZM4XL3XN .
@georgejhunt working on this new branch containing improvements for Android 7 / 8 and Windows 7:
On a new install of captive-portal, after it was pulled into master, I discovered a dependency on cmd-srv in iiab-admin-console. Because of the order one must do the install, this dependency is not met until iiab-admin-console is installed. It will require a reboot, before the captive portal functions. One option would be to move iiab_env.py back into IIAB.
don't think iiab_env.py is part of iiab-admin-console
You're right. It was down in 4_server_options below captive portal. So I did a PR to put it in 3-base-server
On Sun, Nov 18, 2018 at 3:02 PM Tim Moody notifications@github.com wrote:
don't think iiab_env.py is part of iiab-admin-console
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/iiab/iiab/issues/1182#issuecomment-439734104, or mute the thread https://github.com/notifications/unsubscribe-auth/AB04HMir8yd5vXnvW2iTFYNJcqSRhkV7ks5uwecHgaJpZM4XL3XN .
fyi PR #1327 has been merged, containing @georgejhunt's latest Captive Portal ("cap3") as part of Apache.
@georgejhunt: at least 7 of 22 items are now complete on the above checklist.
(Please advise on how we should tidy up Captive Portal for IIAB 6.7's final release in coming days, so testers in all countries report back the most useful data for us in coming weeks!)
@georgejhunt & @jvonau can you confirm merged PR https://github.com/iiab/iiab/pull/1379 is sufficient to resolve the top issue on our Captive Portal checklist above?
(http://iiab-server.lan/home/ is not acceptable in the field; it needs to show http://box/ or http://box.lan/ per custom setting in local_vars.yml)
Is the strategy outlined at http://community.rachelfriends.org/t/captive-portal/1387 promising?
Hi @georgejhunt. Is it currently possible to choose where the captive portal defaults to? Would prefer box.lan/wordpress over box.lan/home if possible. Have edited local_vars.yml to default to WP instead of Home upon typing box.lan, but the captive portal still goes to Home.
Hi @georgejhunt. Is it currently possible to choose where the captive portal defaults to? Would prefer box.lan/wordpress over box.lan/home if possible. Have edited local_vars.yml to default to WP instead of Home upon typing box.lan, but the captive portal still goes to Home.
Excellent Question, thanks @ericnitschke.
ASIDE: please also see the latest Captive Portal glitches on (many but not all) Android 8's and Android 9's, such that you can hopefully confirm the latest with reports of your own:
(In short, not all was resolved here for IIAB 7.0, but we are hopeful that IIAB 7.1 will do a better job with Android 8/9 and the new Android 10 "being released this month August 2019" hopefully too!)
@ericnitschke I think the answer is in https://github.com/iiab/iiab/blob/master/roles/captive-portal/templates/capture-wsgi.py. Perhaps should go to / rather than /home and then picks up the defined default for home page.
@ericnitschke I think the answer is in https://github.com/iiab/iiab/blob/master/roles/captive-portal/templates/capture-wsgi.py. Perhaps should go to / rather than /home and then picks up the defined default for home page.
/home
is hard-coded in 4 places here:
@georgejhunt can you confirm these are the places it needs to be changed and/or recommend a strategy?
I notice that FQDN is being passed to jinja2 ./files/simple.template at line 232 of capture_wsgi.py.
In simple.template, line 72, FQDN is the href target. So I think that it is also necessary to set ./vars/default_vars.yml line 71 to "iiab_home_url: /wordpress". Maybe you have already done that. (But this would only impact function on android clients. You should probably focus on the clients you expect).
We definitely need a better strategy. The captive_portal code is an evolution of trial and error, for all the different clients. I've never found a "one-size fits all" solution.
In the trial and error approach, a change for one client can break function for another client. I found it very frustrating and difficult.
I'm hoping that someone else will pick up the ball, and find a better solution for our next release.
On Fri, Aug 2, 2019 at 7:18 AM A Holt notifications@github.com wrote:
@ericnitschke https://github.com/ericnitschke I think the answer is in https://github.com/iiab/iiab/blob/master/roles/captive-portal/templates/capture-wsgi.py. Perhaps should go to / rather than /home and then picks up the defined default for home page.
/home is hard-coded in 4 places here:
- https://github.com/iiab/iiab/blob/master/roles/captive-portal/templates/capture-wsgi.py#L188
https://github.com/iiab/iiab/blob/master/roles/captive-portal/templates/capture-wsgi.py#L198
https://github.com/iiab/iiab/blob/master/roles/captive-portal/templates/capture-wsgi.py#L218
https://github.com/iiab/iiab/blob/master/roles/captive-portal/templates/capture-wsgi.py#L375
@georgejhunt https://github.com/georgejhunt can you confirm these are the places it needs to be changed and/or recommend a strategy?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/iiab/iiab/issues/1182?email_source=notifications&email_token=AAOTQHBQECHMKCSX5XHQI2DQCQ6ZXA5CNFSM4FZPOXG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3N37BI#issuecomment-517717893, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOTQHCPDYOIVRGFJKNAAO3QCQ6ZXANCNFSM4FZPOXGQ .
And I should have suggested that iiab_home_url be changed in /etc/iiab/local_vars.yml, so that updates to iiab do not overwrite
On Fri, Aug 2, 2019 at 7:52 AM George Hunt georgejhunt@gmail.com wrote:
I notice that FQDN is being passed to jinja2 ./files/simple.template at line 232 of capture_wsgi.py.
In simple.template, line 72, FQDN is the href target. So I think that it is also necessary to set ./vars/default_vars.yml line 71 to "iiab_home_url: /wordpress". Maybe you have already done that. (But this would only impact function on android clients. You should probably focus on the clients you expect).
We definitely need a better strategy. The captive_portal code is an evolution of trial and error, for all the different clients. I've never found a "one-size fits all" solution.
In the trial and error approach, a change for one client can break function for another client. I found it very frustrating and difficult.
I'm hoping that someone else will pick up the ball, and find a better solution for our next release.
On Fri, Aug 2, 2019 at 7:18 AM A Holt notifications@github.com wrote:
@ericnitschke https://github.com/ericnitschke I think the answer is in https://github.com/iiab/iiab/blob/master/roles/captive-portal/templates/capture-wsgi.py. Perhaps should go to / rather than /home and then picks up the defined default for home page.
/home is hard-coded in 4 places here:
- https://github.com/iiab/iiab/blob/master/roles/captive-portal/templates/capture-wsgi.py#L188
https://github.com/iiab/iiab/blob/master/roles/captive-portal/templates/capture-wsgi.py#L198
https://github.com/iiab/iiab/blob/master/roles/captive-portal/templates/capture-wsgi.py#L218
https://github.com/iiab/iiab/blob/master/roles/captive-portal/templates/capture-wsgi.py#L375
@georgejhunt https://github.com/georgejhunt can you confirm these are the places it needs to be changed and/or recommend a strategy?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/iiab/iiab/issues/1182?email_source=notifications&email_token=AAOTQHBQECHMKCSX5XHQI2DQCQ6ZXA5CNFSM4FZPOXG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3N37BI#issuecomment-517717893, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOTQHCPDYOIVRGFJKNAAO3QCQ6ZXANCNFSM4FZPOXGQ .
I'm going to prepare a demo box to run all week during Internet Governance Forum in Berlin (Nov 25 -29). I'll make an explanatory splash page at /wordpress, as done with the box I made for the eLearning Africa conference.
Any ideas for temporary solutions to get the Captive Portal to go straight to /wordpress?
I'm going to prepare a demo box to run all week during Internet Governance Forum in Berlin (Nov 25 -29). I'll make an explanatory splash page at /wordpress, as done with the box I made for the eLearning Africa conference.
Any ideas for temporary solutions to get the Captive Portal to go straight to /wordpress?
@georgejhunt please help telling us which of the following @ericnitschke should set?
/opt/iiab/iiab/roles/captive-portal/files/simple.template#L72-L73 shows:
window.open("http://{{ FQDN }}","_system");
$.ajax("/home_selected");
/opt/iiab/iiab/roles/captive-portal/templates/capture-wsgi.py#L188 shows:
response_headers = [('Location','http://box.lan/home'),
/opt/iiab/iiab/roles/captive-portal/templates/capture-wsgi.py#L198 shows:
response_headers = [('Location','http://' + fully_qualified_domain_name + '/home'),
/opt/iiab/iiab/roles/captive-portal/templates/capture-wsgi.py#218 shows:
location = "http://" + fully_qualified_domain_name + "/home"
/opt/iiab/iiab/roles/captive-portal/templates/capture-wsgi.py#L375 shows:
location = "http://" + fully_qualified_domain_name + "/home"
/opt/iiab/iiab/roles/captive-portal/templates/capture-wsgi.py#L469 shows:
if environ['PATH_INFO'] == "/home_selected":
@ericnitschke of course follow the instructions to (re)install Captive Portal at http://FAQ.IIAB.IO Item 38 ("Captive Portal Administration: What tips & tricks exist?") after you've made any modifications within /opt/iiab/iiab/roles/captive-portal !
@georgejhunt since this is a repeated/ongoing request (@ericnitschke isn't the only person who's asked for this) can we make Captive Portal act upon /etc/iiab/local_vars.yml's customized home page URL iiab_home_url: /wordpress
for example?
(The default is iiab_home_url: /home
as seen in local_vars_medium.yml#L32-L33, that operators/implementers are asked to customize, as explained therein.)
iiab_home_url says where / should redirect. not sure if captive portal can direct to /
If we are going to soft code the captive portal target, perhaps we should use all this information in local_vars.yml: iiab_hostname: box iiab_domain: lan
DokuWiki) iiab_home_url: /home
We already have a path for getting ansible variables into python:
I propose to re-use this mechanism.
On Tue, Oct 29, 2019 at 10:01 AM Tim Moody notifications@github.com wrote:
iiab_home_url says where / should redirect. not sure if captive portal can direct to /
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/iiab/iiab/issues/1182?email_source=notifications&email_token=AAOTQHCNCX245DIPIAMVMRLQRA63TA5CNFSM4FZPOXG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECQS76Q#issuecomment-547434490, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOTQHGMWDJ4P3JYM5GBFVTQRA63TANCNFSM4FZPOXGQ .
why can cap portal not direct to / which is already configured elsewhere to do the right thing?
python3 is a separate topic, but I would like to put all lib type code in /usr/lib/python3/dist-packages/iiab/ there would be a file iiab_lib.py which would contain what is currently in iiab_env.py and other renusable python defs there would also be adm_lib.py if adm cons is installed
why can cap portal not direct to / which is already configured elsewhere to do the right thing?
I'm with Tim on this but if '/' can't be made to work I would suggest using 'iiab_captive_url' in place of the hard-coding so that in local_vars that a user could change 'iiab_captive_url: /home' at will.
I think captive portal can proxy to /. And in the short term maybe that is enough.
Seems fine to put iiab lib in dist-packages.
On Tue, Oct 29, 2019 at 11:54 AM Tim Moody notifications@github.com wrote:
python3 is a separate topic, but I would like to put all lib type code in /usr/lib/python3/dist-packages/iiab/ there would be a file iiab_lib.py which would contain what is currently in iiab_env.py and other renusable python defs there would also be adm_lib.py if adm cons is installed
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/iiab/iiab/issues/1182?email_source=notifications&email_token=AAOTQHHYGSG2SCNHGWL6NOTQRBMCRA5CNFSM4FZPOXG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECRBLEI#issuecomment-547493265, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOTQHAISDUWI643DWQZVXLQRBMCRANCNFSM4FZPOXGQ .
@georgejhunt has been poking at this today to see what's possible with Python 3, and proxying to / (to see if that's the best way to act upon the iiab_home_url
variable?)
Not at all easy, despite what others around the planet perpetually claim (:
Profound thanks George!
FYI on #1810 @tim-moody writes:
mod_wsgi for apache can only be python 2 OR 3, not both. it is used by captive portal cmdsrv pathagar
cross-posted on Skype:
Thanks [ @georgejhunt ] & [ @holta ] for the captive portal help. Just did a big-size install on an RPi4 4GB with a 256 card. Hit the kernel issue Adam warned about, resolved by rpi-update and a restart. I enabled the portal and changed homepage to /wordpress in local_vars.yml. Got the initial landing page with 2 buttons (the page was slightly off center).
First button had me choose between chrome and FF. Second button went straight to /wordpress, which is great.
Then changed /home to /wordpress here:
https://github.com/iiab/iiab/blob/master/roles/captive-portal/templates/capture-wsgi.py#L188
https://github.com/iiab/iiab/blob/master/roles/captive-portal/templates/capture-wsgi.py#L198
https://github.com/iiab/iiab/blob/master/roles/captive-portal/templates/capture-wsgi.py#L218
https://github.com/iiab/iiab/blob/master/roles/captive-portal/templates/capture-wsgi.py#L375
And ran cd /opt/iiab/iiab ./runrole captive-portal
No discernible changes to Captive Portal behavior.
Eric. I'd like to get a captive portal set up to track your experiments. I'll install wordpress, and captive portal on top of buster 9/26/2019 an run it on rpi4. A lot of captive portal code depends on the client that your are trying to manipulate -- by adjusting the client conversations. What client are you working with? (hardware, OS, version)
On Fri, Nov 1, 2019 at 4:04 PM Eric Nitschke notifications@github.com wrote:
cross-posted on Skype:
Thanks @george https://github.com/george & @canoe https://github.com/canoe for the captive portal help. Just did a big-size install on an RPi4 4GB with a 256 card. Hit the kernel issue Adam warned about, resolved by rpi-update and a restart. I enabled the portal and changed homepage to /wordpress in local_vars.yml. Got the initial landing page with 2 buttons (the page was slightly off center).
First button had me choose between chrome and FF. Second button went straight to /wordpress, which is great.
Then changed /home to /wordpress here:
And ran cd /opt/iiab/iiab ./runrole captive-portal
No discernible changes to Captive Portal behavior.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/iiab/iiab/issues/1182?email_source=notifications&email_token=AAOTQHGJ44MFXVNYQJBHG2LQRSDS7A5CNFSM4FZPOXG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC4AREQ#issuecomment-548931730, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOTQHBRFNYQFSMZKCBNQA3QRSDS7ANCNFSM4FZPOXGQ .
Thanks, George. I was testing on an old Nexus 7 2013 tablet (android 6.0.1), which gave the above results. Just tried again on a Motorola X4 (android 9) and the upon clicking the pop-up (Wifi has no internet access, Tap for options), Wordpress comes up, albeit not in the browser.
Perhaps from there the wordpress landing page could have a link to direct users to the equivalent page within their browser of choice.
This is very promising! No more naming SSID: " Go to box.lan/wordpress for xyz...." :)
In the general case, when an OS does not get back an expected "online response" (different for each OS), the OS opens up what I think of as a dumbed down limited browser.
There are lots of things that are disabled in that "walled garden". Documentation is sparse. Trial and error has been my only solution that works -- sometimes.
On Fri, Nov 1, 2019 at 5:17 PM Eric Nitschke notifications@github.com wrote:
Thanks, George. I was testing on an old Nexus 7 2013 tablet (android 6.0.1), which gave the above results. Just tried again on a Motorola X4 (android 9) and the upon clicking the pop-up (Wifi has no internet access, Tap for options), Wordpress comes up, albeit not in the browser.
Perhaps from there the wordpress landing page could have a link to direct users to the equivalent page within their browser of choice.
This is very promising! No more naming SSID: " Go to box.lan/wordpress for xyz...." :)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/iiab/iiab/issues/1182?email_source=notifications&email_token=AAOTQHG5OC6T7TUNPUTM3L3QRSMGZA5CNFSM4FZPOXG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC4F73A#issuecomment-548954092, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOTQHH5MUPQRVIWUU6WENTQRSMGZANCNFSM4FZPOXGQ .
@georgejhunt did you reach any conclusions trying to parametrize Captive Portal's destination site (e.g. http://box/home -> http://box/wordpress etc) last week? What approach is likely best here?
ASIDE: what recommendations to you have towards migrating all of Captive Portal from Python 2.7 to Python 3?
If the ethernet cable is plugged into the Pi, the captive portal landing page (and all navigation) takes about 2.5 minutes to load.
With no cable the pages load immediately.
If the ethernet cable is plugged into the Pi, the captive portal landing page (and all navigation) takes about 2.5 minutes to load.
With no cable the pages load immediately.
TK Kang reported almost exactly the opposite:
Tangentially Related:
Just tested on the latest IIAB 7.1 pre-release on iOS 13.3, Android 8.1, and MacOS 10.2.6.
Update: tested again on MacOS X 10.2.6 today and if I forget the Wifi SSID, Captive Portal does show up! So #3 in my previous comment is no longer valid.
Thanks to @tim-moody & @ivanistheone:
"CAPTIVE PORTAL: The Definitive Guide This is the most comprehensive guide to Captive Portal on the planet." https://rootsh3ll.com/captive-portal-guide/
It may have a more up-to-date listing of "magic URL's" used by the latest browsers to detect whether they're online etc?
Just FYI NoDogSplash (Captive Portal) has split into two projects:
1) NoDogSplash - stripped down and FAS removed to optimise for legacy devices with very restricted resources.
2) openNDS - containing the full FAS API for developing custom dynamic splash pages. (FAS = Forward Authentication Service)
'As "no code" is the "smallest code", the simple Dnsmasq hack is the best way forward for NoDogSplash.' [apparently targeting tiny devices like Raspberry Pi Zero]
Building on #412 #608 PRs #870 #1179 #1180 towards a Captive Portal understandable by almost all:
block_DNS
&dns_jail_enabled
in default_vars.yml & local_vars.ymliiab_home_url: /wordpress
oriiab_home_url: /nextcloud
when implementer has changed this fromiiab_home_url: /home