Skip to content

Instantly share code, notes, and snippets.

@cemysce
cemysce / .bashrc
Last active October 25, 2024 15:00
Termux .bashrc snippet to override resolv.conf with Wi-Fi DHCP DNS config
# This is to help address this Termux/Android issue:
# https://github.com/termux/termux-packages/issues/1174
function _getAndroidAllDNS()
{
local -n dnsMapRef=$1
local -n domainMapRef=$2
# The logic here is from experimentation based on:
# https://www.reddit.com/r/termux/comments/1249mqx/use_dhcp_provided_dns_in_resolveconf/