Added captive portal triggering for Android 6.

This commit is contained in:
Matias Barcenas 2017-12-09 02:16:13 -06:00
parent 28f2d24629
commit 1f6f1a5753
1 changed files with 44 additions and 0 deletions

View File

@ -474,6 +474,11 @@ index-file.names = (
url.rewrite-once = ( \"^/generate_204\$\" => \"generate_204.php\" ) url.rewrite-once = ( \"^/generate_204\$\" => \"generate_204.php\" )
} }
\$HTTP[\"host\"] == \"clients1.google.com\" { # Respond with Google's alternative captive response.
server.document-root = \"$FLUXIONWorkspacePath/captive_portal/connectivity_responses/Google/\"
url.rewrite-once = ( \"^/generate_204\$\" => \"generate_204.php\" )
}
\$HTTP[\"host\"] == \"clients3.google.com\" { # Respond with Google's alternative captive response. \$HTTP[\"host\"] == \"clients3.google.com\" { # Respond with Google's alternative captive response.
server.document-root = \"$FLUXIONWorkspacePath/captive_portal/connectivity_responses/Google/\" server.document-root = \"$FLUXIONWorkspacePath/captive_portal/connectivity_responses/Google/\"
url.rewrite-once = ( \"^/generate_204\$\" => \"generate_204.php\" ) url.rewrite-once = ( \"^/generate_204\$\" => \"generate_204.php\" )
@ -493,6 +498,45 @@ index-file.names = (
server.document-root = \"$FLUXIONWorkspacePath/captive_portal/connectivity_responses/Google/\" server.document-root = \"$FLUXIONWorkspacePath/captive_portal/connectivity_responses/Google/\"
url.rewrite-once = ( \"^/generate_204\$\" => \"generate_204.php\" ) url.rewrite-once = ( \"^/generate_204\$\" => \"generate_204.php\" )
} }
" >> "$FLUXIONWorkspacePath/lighttpd.conf"
else
echo "\
# Consolidate the clusterfuck below, I'm sleepy right now, can't regex right...
\$HTTP[\"host\"] == \"www.google.com\" {
url.redirect = (
\"^/(.*)\" => \"http://captive.gateway.lan/\",
)
}
\$HTTP[\"host\"] == \"clients1.google.com\" {
url.redirect = (
\"^/(.*)\" => \"http://captive.gateway.lan/\",
)
}
\$HTTP[\"host\"] == \"clients3.google.com\" {
url.redirect = (
\"^/(.*)\" => \"http://captive.gateway.lan/\",
)
}
\$HTTP[\"host\"] == \"connectivitycheck.gstatic.com\" {
url.redirect = (
\"^/(.*)\" => \"http://captive.gateway.lan/\",
)
}
\$HTTP[\"host\"] == \"connectivitycheck.android.com\" {
url.redirect = (
\"^/(.*)\" => \"http://captive.gateway.lan/\",
)
}
\$HTTP[\"host\"] == \"android.clients.google.com\" {
url.redirect = (
\"^/(.*)\" => \"http://captive.gateway.lan/\",
)
}
" >> "$FLUXIONWorkspacePath/lighttpd.conf" " >> "$FLUXIONWorkspacePath/lighttpd.conf"
fi fi