According to android source code for emualator (generic/goldfish), a native executable named ipv6proxy is provided for forwarding traffic between wlan1/radio0-peer and eth0.
The network architecture is described in device/generic/goldfish/wifi/init.wifi.sh at https://android-opengrok.bangnimang.net/android-9.0.0_r61/xref/device/generic/goldfish/wifi/init.wifi.sh?r=23c07326.
# main namespace router namespace # ------- ---------- | --------------- # | ril |<----->| radio0 |<--+--->| radio0-peer |<-------+ # ------- ---------- | --------------- | # | ^ | # | | | # | v v # | ************* -------- # | * ipv6proxy *<--->| eth0 |<--+ # | ************* -------- | # | ^ ^ | # | | | | # | v | | # ------------------ --------- | --------- | | # | wpa_supplicant |<->| wlan0 |<--+------->| wlan1 |<---------+ | # ------------------ --------- | --------- | # | ^ ^ | # | | | v # | v v -------- # | *********** *********** | host | # | * hostapd * * dnsmasq * -------- # | *********** ***********
According to this script, the ipv4 traffic is NAT forwarded by iptables, but ipv6 is forwarded by ipv6proxy in userspace.
Why?
The module ipv6proxy is located at https://android-opengrok.bangnimang.net/android-9.0.0_r61/xref/device/generic/goldfish/wifi/ipv6proxy/. Command line to start it is ipv6proxy -o eth0 -i wlan1,radio0-peer.
ipv6proxy -o eth0 -i wlan1,radio0-peer
1.4m articles
1.4m replys
5 comments
57.0k users