From c1d482de1c9600d7092218e18403c81813cc295e Mon Sep 17 00:00:00 2001 From: samuel-p <codes@samuel-philipp.de> Date: Thu, 22 Aug 2019 23:29:03 +0200 Subject: [PATCH] added initial files --- .gitignore | 3 +++ .htaccess | 7 +++++++ index.html | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 .gitignore create mode 100644 .htaccess create mode 100644 index.html diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..72beccc --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# IntelliJ project files +.idea +*.iml \ No newline at end of file diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..54d2930 --- /dev/null +++ b/.htaccess @@ -0,0 +1,7 @@ +RewriteEngine On + +RewriteCond "%{REQUEST_FILENAME}" "(generate)?_?204" +RewriteRule "(generate)?_?204" / [R=204,L] + +RewriteCond %{HTTPS} off +RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..7aa1d59 --- /dev/null +++ b/index.html @@ -0,0 +1,46 @@ +<html> +<head> + <title>connectivity-check</title> +</head> + +<body> +<h1>connectivity-check</h1> + +<hr> + +<h2>Setup Android</h2> + +If you want to use <code>http</code>: +<pre># settings put global captive_portal_use_https 0</pre> +<pre># settings put global captive_portal_http_url "http://connectivitycheck.sp-codes.de/generate204"</pre> + +If you want to use <code>https</code>: +<pre># settings put global captive_portal_use_https 1</pre> +<pre># settings put global captive_portal_https_url "https://connectivitycheck.sp-codes.de/generate204"</pre> + +<p>Maybe you have to reboot your phone after updating the settings. For more information see <a href="https://android.stackexchange.com/a/186995/288049">this</a>.</p> +<p>If you are using AFWall+ you need to give access to [1000] Android-System and in some cases [10040] CaptivePortalLogin to make it work.</p> + +<hr> + +<h2>Setup Ubuntu</h2> + +Open <code>/etc/NetworkManager/NetworkManager.conf</code>: + +<pre># sudo nano /etc/NetworkManager/NetworkManager.conf</pre> + +Add the following lines (or change them to this): + +<pre> +[connectivity] +uri=https://connectivitycheck.sp-codes.de/generate204 + </pre> + +Restart the network-manager: + +<pre># sudo service network-manager restart</pre> + +<p>For more information see <a href="https://askubuntu.com/q/1167177/920103">this</a>.</p> +</body> + +</html> \ No newline at end of file