Merge pull request #326 from FluxionNetwork/captive-redirection

Global Captive Redirection
This commit is contained in:
Matias Barcenas 2017-12-24 15:21:49 -06:00 committed by GitHub
commit f2e2e76158
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 8 deletions

View File

@ -480,11 +480,6 @@ index-file.names = (
\"index.html\", \"index.html\",
\"index.php\" \"index.php\"
) )
# Redirect www.domain.com to domain.com
#\$HTTP[\"host\"] =~ \"^www\.(.*)$\" {
# url.redirect = ( \"^/(.*)\" => \"http://%1/\$1\" )
#}
" > "$FLUXIONWorkspacePath/lighttpd.conf" " > "$FLUXIONWorkspacePath/lighttpd.conf"
# Configure lighttpd's SSL only if we've got a certificate and its key. # Configure lighttpd's SSL only if we've got a certificate and its key.
@ -514,9 +509,8 @@ index-file.names = (
" >> "$FLUXIONWorkspacePath/lighttpd.conf" " >> "$FLUXIONWorkspacePath/lighttpd.conf"
else else
echo "\ echo "\
# Android requires an explicit redirection code on certain domains. # Redirect all traffic to the captive portal when not emulating a connection.
# Domains: www.google.com, clients[0-9].google.com, connectivitycheck.gstatic.com, connectivitycheck.android.com, android.clients.google.com, alt[0-9]-mtalk.google.com, mtalk.google.com \$HTTP[\"host\"] != \"captive.gateway.lan\" {
\$HTTP[\"host\"] =~ \"((www|(android\.)?clients[0-9]*|(alt[0-9]*-)?mtalk)\.google|connectivitycheck\.(android|gstatic))\.com\" {
url.redirect = ( url.redirect = (
\"^/(.*)\" => \"http://captive.gateway.lan/\", \"^/(.*)\" => \"http://captive.gateway.lan/\",
) )