fix bug when get local address from socket return 0.0.0.0

use local address from interfaces instead