Hanbae Seo
- Forum posts: 2
Mar 21, 2013, 1:32:49 AM via Website
Mar 21, 2013 1:32:49 AM via Website
-Environment-
1. VPN connection
In this environment, I want to know "10.8.0.14" regardless of the interface name using Android API.
I cound find only a way to get default route IP address below
1. VPN connection
- Virtual interface(tun0) for VPN connection directly connects to a default gateway that is changed into VPN server IP
2. Interfaces & default gateway interfaces :
default gateway : 10.8.0.2
lo inet addr:127.0.0.1
wlan0 inet addr:150.149.131.5
tun0 inet addr:10.8.0.14
default gateway : 10.8.0.2
I cound find only a way to get default route IP address below
1mSocket = new Socket(dstAddress, peerPortNum);
2mStrMyIPAddr = mSocket.getLocalAddress().getHostAddress();
But, I do not want to use Socket 2mStrMyIPAddr = mSocket.getLocalAddress().getHostAddress();
— modified on Mar 21, 2013, 5:38:55 AM
Recommended editorial content
With your consent, external content is loaded here.
By clicking on the button above, you agree that external content may be displayed to you. Personal data may be transmitted to third-party providers in the process. You can find more information about this in our Privacy Policy.