Skip to content
Back to skills

Termux Network

ASecurity

Diagnose network problems inside Termux (DNS, TLS certificate errors, clock skew, proxies, binding ports, reaching a Termux server from the phone or LAN) given Android's restrictions on interfaces and low ports. Use when curl, pip, git, or a local server cannot connect, when ifconfig or netstat show nothing, or when TLS reports a certificate not yet valid. Do NOT use for Wi-Fi or carrier faults outside the device, or for sshd specifics (see termux-sshd).

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 5, 2026
developmentrustdebugginggit

Works with

  • cli

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned October 5, 2026

npx -y skills add Alex72-py/termux-elite --skill termux-network --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Termux Network?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Termux Network
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/alex72-py-termux-network/badge)](https://www.skillsdirectory.com/skills/alex72-py-termux-network)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: termux-network
description: Diagnose network problems inside Termux (DNS, TLS certificate errors, clock skew, proxies, binding ports, reaching a Termux server from the phone or LAN) given Android's restrictions on interfaces and low ports. Use when curl, pip, git, or a local server cannot connect, when ifconfig or netstat show nothing, or when TLS reports a certificate not yet valid. Do NOT use for Wi-Fi or carrier faults outside the device, or for sshd specifics (see termux-sshd).
license: MIT
compatibility: Termux on Android (Bionic libc, usually aarch64). Where a skill says so, also usable from a proot distro.
metadata:
  risk: "low"
  triggers: "termux no internet,dns failure,certificate verify failed,ifconfig empty,cannot bind port,curl failed termux,certificate not yet valid,no internet,dns lookup fails,certificate error,trust error"
---
# Termux Network

## Purpose
Locate a connection failure at the right layer (clock, DNS, TLS trust, proxy, bind address, port range, or the network itself) using checks that work under Android's restrictions.

## When to use
- `curl`, `pip`, `npm`, `git`, or `pkg` cannot connect or time out.
- `SSL: CERTIFICATE_VERIFY_FAILED` or a certificate that is not yet valid.
- A local server cannot be reached from the phone's browser or from another device.
- `ifconfig`, `ip`, or `netstat` print nothing useful.

## When NOT to use
- Faults outside the device (router, carrier, Wi-Fi password).
- SSH-specific access problems: `termux-sshd`.

## Preconditions
Run `sh scripts/check-network.sh` (read-only). Pass a hostname as the single argument only if one outbound request is acceptable.

## Decision tree
1. Check the clock first. A wrong date breaks TLS and package signatures (`not yet valid`). Fix the date in Android settings.
2. TLS errors with a correct clock: confirm the CA bundle exists (`ca_bundle` in the script output; Termux keeps it under `$PREFIX/etc/tls`) and that no proxy or interception certificate is in the path.
3. Name resolution: Termux uses its own resolver configuration, which can differ from Android's Private DNS or VPN settings. Compare behavior with a literal IP address to separate DNS from connectivity.
4. Proxy variables (`http_proxy`, `https_proxy`, `ALL_PROXY`): report which are set, never their values, since values can carry credentials.
5. IPv6 trouble on some networks: retry once forcing IPv4 (`curl -4`) before concluding the host is down.
6. Android restricts listing network interfaces for apps, so empty `ifconfig` or `ip` output is not proof of no network. Test with a real connection instead.
7. Binding a server: ports below 1024 cannot be bound without root; use 1024 or above. Bind `127.0.0.1` for local-only use, `0.0.0.0` to accept LAN clients.
8. Reaching Termux from the phone's own browser works through `127.0.0.1:<port>`. From another device it needs the phone's LAN address, a `0.0.0.0` bind, and a network that does not isolate clients.
9. A hotspot or guest Wi-Fi often blocks device-to-device traffic. Test on a normal LAN before debugging the server.

## Example
- Situation: pip fails with certificate is not yet valid.
- Without the skill: Adds `--trusted-host` or disables verification.
- With the skill: Checks the clock first, finds the date wrong, asks the user to enable automatic time in Android settings, and re-runs the unchanged command.

## Safety
Read-only by default. Do not print proxy URLs, tokens, or full environment dumps. Never disable TLS verification (`-k`, `verify=False`, `StrictHostKeyChecking=no`) as a fix; at most use it for a single labeled diagnostic probe and say so.

## Verification
Repeat the original failing request and show its status. For a server, request it from the intended client and report the result.

## Handoffs
- `termux-environment` for Android version and side.
- `package-troubleshooting` when only `pkg` or `apt` downloads fail.
- `git-credentials` when the host is reachable but authentication fails.
- `termux-sshd` when the failing service is the SSH server.

## Report
The layer at fault (clock, trust store, DNS, proxy, bind, port, network), the evidence, the single change, and the repeat-request result.

Files in this skill

  • SKILL.md4.1 KB
  • scripts/check-network.sh1.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.