Domain Monitor · Field Setup

Probe Phone Setup

One phone per telco, checking every domain every 15 minutes. Work through this once per phone — about 20 minutes each. Do the Maxis phone first and finish it completely; once that one is confirmed reporting, the other four are the same steps.

Setting up the Maxis phone. Every command below is already correct for this one — your progress is saved per phone.

Get these three wrong and every result is fiction

  1. Private DNS must be OFF — not "Automatic". Otherwise we can't see what the telco's DNS is really answering.
  2. WiFi must be OFF, mobile data ON. On WiFi this phone tests the office line, not the telco.
  3. WiFi must be ON, mobile data OFF. This phone is meant to be on WiFi — it measures a fixed fibre line, not a mobile network.
  4. Termux must be excluded from battery saving, or Android kills it after a few hours and the phone goes quiet.
PART 0

Before you start

Five phones go into service. Each one gets its own script file — they are not interchangeable, and a phone running the wrong file reports another telco's results under the wrong name.

OrderLabel the phoneNetwork it must be onReports as
1stMAXISMaxis / Hotlink SIM — mobile data on, WiFi offmaxis
2ndCELCOMDIGICelcom or Digi SIM — mobile data on, WiFi offcelcomdigi
3rdU MOBILEU Mobile SIM — mobile data on, WiFi offumobile
4thUNIFINo SIM. WiFi on a TM/Unifi fibre lineunifi
5thTIMENo SIM. WiFi on a TIME fibre linetime

On the table before you begin

Keep the SIMs alive

Each phone uses well under 100 MB a month — you're paying to keep the line open, not for data. Put a monthly reload reminder on someone's calendar. An expired SIM looks a lot like a blocked domain.

The Digi question — ten minutes, on the CelcomDigi phone only

Celcom and Digi merged but may still run two networks. No sixth phone needed: once the CelcomDigi phone is finished, put the Digi SIM in it, run the block-address test in Part 5 again, then put the Celcom SIM back. Same answer means one network — keep either SIM and drop the other. A different answer means we need a sixth phone, so send both results over.

PART 1

Install Termux

Do this on the phone itself, not on a computer. Two apps, both from GitHub.

Both apps must come from GitHub

Not the Play Store — that version is abandoned and will not work. And don't mix sources: if you get Termux from GitHub and Termux:Boot from anywhere else, Termux:Boot silently does nothing, and the phone stops reporting the first time it restarts.

  1. 01

    Open Chrome on the phone and go to:

    github.com/termux/termux-app/releases
  2. 02

    The newest release is at the top of the page. Under it, tap Assets to expand the file list if it's collapsed.

  3. 03

    There are about ten files. You want the one that ends in _arm64-v8a.apk and has apt-android-7 in the middle. It looks like this:

    termux-app_v0.118.3+apt-android-7-github-debug_arm64-v8a.apk

    The version number will be higher by the time you read this — that's fine, just match the two highlighted parts. Ignore every apt-android-5 file; those are for phones from 2015.

    If Android says "App not installed"

    The phone is an older 32-bit model. Go back and download the _universal.apk file from the same list instead — it works on every phone.

  4. 04

    When the download finishes, tap it to open. Android will warn about installing from an unknown source — tap Settings → turn on Allow from this source → go back → Install.

  5. 05

    Now the second app. Go to:

    github.com/termux/termux-boot/releases

    This is what restarts the checker after the phone reboots. Without it, one power cut or Android update takes this telco offline permanently.

  6. 06

    Same routine: newest release at the top → expand Assets → download the file ending in _arm64-v8a.apk → install it.

  7. 07

    Open Termux:Boot once. The screen will look completely empty — that's normal and correct. If you never open it, it never arms itself, and the phone stops reporting the first time it restarts.

PART 2

Phone settings

The part people get wrong. Menu names vary a little by phone brand.

  1. 01

    Turn Private DNS off.

    Settings Network & internet Private DNS Off

    On Samsung it's Settings › Connections › More connection settings › Private DNS. If you can't find it, search the Settings app for "Private DNS".

  2. 02

    Turn WiFi off. Turn mobile data on. Then leave it that way forever.

    Swipe down from the top of the screen and check the WiFi icon is grey, not lit.

  3. 02

    Connect to the WiFi on the line you're measuring. Turn mobile data off.

    This phone measures a fixed fibre line, so WiFi is exactly what we want here — it needs no SIM card at all. It does not have to sit in your office: any premises on that ISP works, as long as it has power and WiFi. Nobody there needs to do anything.

  4. 03

    Stop Android from killing Termux.

    Settings Apps Termux Battery Unrestricted

    On Xiaomi / Redmi / POCO there are two settings, and you need both:

    Settings Apps Manage apps Termux Battery saver No restrictions
    Settings Apps Permissions Autostart Termux On
  5. 04

    Remove the screen lock.

    Settings Security Screen lock None

    After a reboot, Android won't run the checker until the phone has been unlocked once. With no lock screen it restarts on its own at 3am without anyone touching it. These phones hold nothing personal, so there's nothing to protect.

  6. 05

    Plug it in and leave it plugged in. Put it somewhere open — not in a drawer or a sealed box.

PART 3

Install the checker

The phone downloads its own script — nothing to email across, nothing to copy off an SD card. Commands are case-sensitive; use the copy buttons.

You need the install code

A short code, ten characters, given to you separately. It is a password — it hands over the phone's reporting key, so don't put it in a group chat and don't write it on the guide. It gets switched off once all five phones are built.

  1. 01

    Open Termux. Bring it fully up to date, then install what it needs:

    $ pkg update -y && pkg upgrade -y && pkg install -y curl

    If it asks anything, press Enter to accept. This takes two or three minutes and prints a lot of text.

    Don't shorten this line

    pkg update only refreshes the list of available packages — it upgrades nothing. Skip pkg upgrade and you get a new curl sitting on an old SSL library, which fails with CANNOT LINK EXECUTABLE "curl" the first time you use it.

    If you already see that error, don't reach for pkgpkg uses curl itself, so it cannot repair this. Use apt, which doesn't:

    $ apt update && apt full-upgrade -y

    Press Enter at any configuration-file question. Then confirm with curl --version. If apt update also fails, run termux-change-repo, pick any single mirror from the blue menu, and run the apt line again.

  2. 02

    Type this line, putting the install code where the x's are, and press Enter. This is the only thing you type by hand in the whole setup:

    $ CODE=xxxxxxxxxx

    Nothing happens when you press Enter. That's correct.

  3. 03

    Now copy this whole block and paste it into Termux — long-press the screen and choose Paste. It fetches this phone's own script and starts it:

    $ mkdir -p ~/.termux/boot
    $ curl -fsS "https://domain-monitor.miya-gwen996.workers.dev/i/$CODE/umobile" -o ~/.termux/boot/probe.sh
    $ chmod +x ~/.termux/boot/probe.sh
    $ ~/.termux/boot/probe.sh &

    The telco name is already correct for the phone you picked at the top of this page — that's what tells the monitor which network these results came from.

  4. 04

    Check the script actually came down:

    $ head -1 ~/.termux/boot/probe.sh

    It should print #!/data/data/com.termux/files/usr/bin/bash.

    If you got an error instead

    401 or bad install code — the code in step 02 was mistyped. Do step 02 and 03 again.
    400 or unknown phone — the telco name is wrong. Check the picker at the top of this page matches the label on the back of the handset.
    Could not resolve host — the phone has no working internet. Check mobile data is on and the SIM has credit.

PART 4

Prove it's working

Don't skip this. A phone that looks fine but reports nothing is the whole problem we're solving.

  1. 01

    Wait two minutes, then check its log:

    $ cat ~/probe.log

    You want to see a line saying sweep done with a number of domains checked. If you see domain refresh failed, the phone has no working internet — check mobile data is on and the SIM has credit.

  2. 02

    Restart the phone. This is the real test — it proves the checker comes back by itself.

  3. 03

    Wait five minutes after it boots, open Termux again and run cat ~/probe.log. A fresh probe starting line means it restarted on its own. That's the phone finished.

  4. 04

    Send word that this phone is live, along with the last few lines of its log:

    $ tail -n 5 ~/probe.log

    Screenshot that and send it with the telco name. It gets confirmed at the other end — the phone arms itself automatically on its first report, so nothing else is needed to switch this telco on.

    Then do Part 5 on this same phone before you move to the next one.

Finished checklist

PART 5

Capture the block address

Two minutes, on every phone, right after it starts reporting. This is the one step that can only be done from inside the telco's network — nobody can do it for you afterwards.

Why this matters

When a Malaysian telco blocks a domain it doesn't show a block page. It quietly answers the lookup with a different address of its own, and that address serves nothing at all — the user just sees a tab that hangs forever. We already know Maxis uses 175.139.142.25. We do not yet know the equivalent for CelcomDigi, U Mobile, Unifi or TIME.

Without it the monitor still catches the block — it just reports it in vaguer wording. With it, the alert says plainly which telco is blocking and what it redirected to.

  1. 01

    First make sure Part 4 is done and the log has said sweep done at least once. That's what downloads the domain list this test reads.

  2. 02

    In Termux, paste this in one go and press Enter. It looks up every domain through this phone's own network and counts how often each address comes back.

    $ cd ~ && while IFS= read -r d; do ip=$(ping -c 1 -W 1 "$d" 2>/dev/null | head -1 | sed -n 's/.*(\([0-9.]\{7,15\}\)).*/\1/p'); [ -n "$ip" ] && echo "$ip"; done < domains.txt | sort | uniq -c | sort -rn | head -8

    It takes up to two minutes and the screen sits still while it runs. That's normal — leave it alone until it prints.

  3. 03

    You'll get eight lines, each a count and an address:

      31 175.139.142.25
       2 104.21.9.14
       1 172.67.181.203
       1 47.84.198.177

    Normal domains each have their own address, so most lines show a 1 or a 2. A line with a big number — a dozen, thirty, fifty domains all pointing at one single address — is the telco's block address. That is the whole test.

  4. 04

    Screenshot the output and send it, with the telco name. Don't decide which line it is and don't type the address out by hand — send the whole thing and let it be read at the other end. A digit typed wrong here makes a real block invisible.

  5. 05

    If every line shows a small number, nothing is blocked on this telco at this moment. That is a perfectly good result — send it anyway and carry on to the next phone. The test gets re-run the next time a block appears.

Nothing to install for this

Once the address is confirmed it gets added centrally, and every phone picks it up by itself within fifteen minutes. No phone is ever touched again for this — you don't come back and edit anything on the handsets.

PART 6

The daily check

Thirty seconds a day. The system alerts you when something's wrong, so a quiet channel is good news.

  1. 01

    All five phones on, screens can be off, all still plugged in and charging.

  2. 02

    No Probe offline message in the Telegram channel. If there is one, it names the phone — go fix that one.

  3. 03

    Once a month: top up each prepaid SIM so the line doesn't expire. A dead SIM looks a lot like a blocked domain if nobody's watching.

PART 7

When something's wrong

Almost every problem is one of these four.

What you seeWhat it meansFix
"Probe offline" alert Phone off, out of battery, or Android killed Termux Unlock the phone, open Termux, then reboot it. Re-check the battery setting in Part 2.
Phone went quiet after a restart Termux:Boot was never opened, or the screen lock is back on Open Termux:Boot once, remove the screen lock, reboot again.
One telco suddenly shows everything working Somebody connected that phone to WiFi Turn WiFi off. It was testing the office line, not the telco.
CANNOT LINK EXECUTABLE "curl" Termux was half-upgraded — new curl, old SSL library Run apt update && apt full-upgrade -y (not pkg — it needs curl itself), then curl --version to confirm, then redo Part 3.
domain refresh failed in the log No internet on the phone Check mobile data is on and the SIM still has credit.

Start over cleanly

If a phone is misbehaving and you want a clean slate, this stops the checker and restarts it from scratch:

$ pkill -f probe.sh
$ rm -f ~/probe.log ~/domains.txt
$ ~/.termux/boot/probe.sh &