A self-hosted captive portal connectivity check: https://connectivitycheck.sp-codes.de
Aller au fichier
Renovate Bot 1f0c450c4c
Build and Push Docker image / Build and Push Docker image (push) Successful in 13s Détails
Update nginx:1.25.4-alpine Docker digest to 31bad00
2024-03-21 00:00:19 +00:00
.forgejo/workflows migrated to workflows 2023-12-07 22:45:43 +01:00
.gitignore added initial files 2019-08-22 23:29:03 +02:00
Dockerfile Update nginx:1.25.4-alpine Docker digest to 31bad00 2024-03-21 00:00:19 +00:00
LICENSE Initial commit 2019-08-22 23:19:48 +02:00
README.md Added description for Fedora33 2021-03-23 00:27:39 +01:00
nginx.conf added nginx config, Dockerfile and ci build with .drone.yml 2020-05-01 11:36:49 +02:00
renovate.json migrated to workflows 2023-12-07 22:45:43 +01:00

README.md

connectivity-check

Build Status License Docker Pulls

A self-hosted captive portal connectivity check.

Usage

Just run the following command:

docker run -d -p 80:80 -p 443:443 samuelph/connectivity-check

Or with docker-compose:

version: '3.4'

services:
  connectivitycheck:
    image: samuelph/connectivity-check
    restart: always
    ports:
      - 80:80
      - 443:443

Run on a simple web space

Instead of running the docker image you also can just use the following .htaccess file on your web server:

RewriteEngine On

Header always set "X-NetworkManager-Status" "online"

RewriteCond "%{REQUEST_FILENAME}" "(generate)?_?204"
RewriteRule "(generate)?_?204" / [R=204,L]

RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Setup your devices

Android

To change the Captive Portal Check in Android, you need a terminal app or a connection via ADB to a computer.

To use http you can run the following commands with the respective method:

# settings put global captive_portal_use_https 0
# settings put global captive_portal_http_url "http://connectivitycheck.sp-codes.de/generate204"

To use https you can use the following two commands:

# settings put global captive_portal_use_https 1
# settings put global captive_portal_https_url "https://connectivitycheck.sp-codes.de/generate204"

Maybe you have to reboot your phone after updating the settings.

If you are using AFWall+ you need to give access to [1000] Android-System and in some cases [10040] CaptivePortalLogin to make it work.

For more information see here.

Ubuntu

In Ubuntu, the file /etc/NetworkManager/NetworkManager.conf must be changed. Add or change the following lines:

[connectivity]
uri=https://connectivitycheck.sp-codes.de/generate204

Restart the network-manager:

sudo service network-manager restart

For more information see here.

Fedora

In Fedora, the file /etc/NetworkManager/NetworkManager.conf must be changed. Add or change the following lines:

[connectivity]
uri=https://connectivitycheck.sp-codes.de/generate204

Restart the NetworkManager:

sudo service NetworkManager restart

Firefox

Type about:config in the Firefox address bar and search for captivedetect.canonicalURL and network.connectivity-service. Set the URL values to https://connectivitycheck.sp-codes.de/generate204, the domain values to connectivitycheck.sp-codes.de. That's it.

License

connectivity-check is Free Software: It is licensed under MIT (See LICENSE for more information).