One comment regarding external USB 3.0 Realtek WiFi. When I was configuring mine I had problems with building the source code. After some digging on this forum I managed to get it to work by running this set of commands:
sudo apt -y install raspberrypi-kernel-headers
sudo ln -s /usr/src/linux-headers-$(uname -r)/arch/arm/ /usr/src/linux-headers-$(uname -r)/arch/armv7l
sudo apt -y install git
sudo apt -y install gcc
cd /usr/src
sudo git clone https://github.com/EntropicEffect/rtl8822bu
cd rtl8822bu
sudo nano Makefile
# Update lines 100 and 101 to this and save the file:
# CONFIG_PLATFORM_I386_PC = n
# CONFIG_PLATFORM_ARM_RPI = y
sudo make
sudo make install
I hope this will help others who experience the same problem
PS My WiFi dongle is connected through USB 3.0 passive hub