There are several ways to provide your MacBook Pro with Internet via some obscure socket, typically using OpenVPN, complemented by stubby for dns-over-tls. This works in Terminal
However, other GUI apps refuse to recognize that Internet is available because of how macOS detects connectivity. No custom network service can convince macOS that there is Internet. Only real network services like Ethernet, Bluetooth and Wi-Fi can do this, giving a green dot and “Connected” status in Network Preferences
How can I configure Catalina or issue a command on the command-line that convinces macOS GUI that Internet and dns are available?
scutil --dns | head -8 # displays the dns server used for general queries
# general queries are a vanilla request for any interface
# scoped queries are directed to particular interface
# dns servers comes from networkservices
# network services are evaluated in particular order
networksetup -listnetworkserviceorder
# each network service is associated with a hardware port
networksetup -listallhardwareports
# hardware ports have a magic state of being connected
# if a hardware port is not connected, its dns configuration is ignored
# if you don't have a hardware port, which in this case you do not
# you are not going to have any hardware port that is connected
# therefore there are no dns servers
# therefore no dns queries are executed by macOS
# the trick at the moment is to connect bluetooth to any device
# which means there is hardware port that is connected
# therefore, dns queries are executed
# executed queries are picked up by stubby: success!
# the question here is to compel macOS to execute dns queries anyway
# without a real hardware port
# without such trickery, dns will only work in Terminal that does not use that part of macOS