termux-network
Skill2 starsChanged 57 days agoMITView on GitHub
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).
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- background-processesSkill
- git-credentialsSkill
- github-actionsSkill
- node-native-buildSkill
- package-troubleshootingSkill
- proot-boundariesSkill
- python-native-buildSkill
- storage-permissionsSkill
- termux-adbSkill
- termux-apiSkill
- termux-backupSkill
- termux-environmentSkill
- termux-servicesSkill
- termux-sshdSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
Run sh scripts/check-network.sh (read-only).
- Very specific: line 29
Check the clock first. A wrong date breaks TLS and package signatures (not yet valid).
- Very specific: line 45
Read-only by default. Do not print proxy URLs, tokens, or full environment dumps.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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, orpkgcannot connect or time out.SSL: CERTIFICATE_VERIFY_FAILEDor a certificate that is not yet valid.- A local server cannot be reached from the phone's browser or from another device.
ifconfig,ip, ornetstatprint 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
- Check the clock first. A wrong date breaks TLS and package signatures (
not yet valid). Fix the date in Android settings. - TLS errors with a correct clock: confirm the CA bundle exists (
ca_bundlein the script output; Termux keeps it under$PREFIX/etc/tls) and that no proxy or interception certificate is in the path. - 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.
- Proxy variables (
http_proxy,https_proxy,ALL_PROXY): report which are set, never their values, since values can carry credentials. - IPv6 trouble on some networks: retry once forcing IPv4 (
curl -4) before concluding the host is down. - Android restricts listing network interfaces for apps, so empty
ifconfigoripoutput is not proof of no network. Test with a real connection instead. - Binding a server: ports below 1024 cannot be bound without root; use 1024 or above. Bind
127.0.0.1for local-only use,0.0.0.0to accept LAN clients. - 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, a0.0.0.0bind, and a network that does not isolate clients. - 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-hostor 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-environmentfor Android version and side.package-troubleshootingwhen onlypkgoraptdownloads fail.git-credentialswhen the host is reachable but authentication fails.termux-sshdwhen 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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

