Skip to Content.
Sympa Menu

ndt-dev - [ndt] r361 committed - [Fixed issue #46]: JavaScript API now returns public IP of clients whe...

Subject: NDT-DEV email list created

List archive

[ndt] r361 committed - [Fixed issue #46]: JavaScript API now returns public IP of clients whe...


Chronological Thread 
  • From:
  • To:
  • Subject: [ndt] r361 committed - [Fixed issue #46]: JavaScript API now returns public IP of clients whe...
  • Date: Tue, 08 Jun 2010 14:18:25 +0000

Revision: 361
Author: sspeery
Date: Tue Jun 8 07:17:45 2010
Log: [Fixed issue #46]: JavaScript API now returns public IP of clients when NAT is being used
http://code.google.com/p/ndt/source/detail?r=361

Modified:
/trunk/Applet/Tcpbw100.java

=======================================
--- /trunk/Applet/Tcpbw100.java Thu May 6 06:28:11 2010
+++ /trunk/Applet/Tcpbw100.java Tue Jun 8 07:17:45 2010
@@ -1114,8 +1114,7 @@
return true;
}

- // Get client and server IP addresses from the outSocket.
- pub_clientIP =
outSocket.getLocalAddress().getHostAddress().toString();
+ // Get server IP address from the outSocket.
pub_host =
outSocket.getInetAddress().getHostAddress().toString();


@@ -2206,6 +2205,13 @@
tokens = new StringTokenizer(tmpstr2, ";");
String ssip = tokens.nextToken();
String scip = tokens.nextToken();
+
+ // Fix for JS API not reporting NAT'd IPs correctly
+ // Assign client and server IP addresses for JA API
+ // based on public, not local IP.
+ pub_clientIP = ssip;
+
+
// results.append("ssip=" + ssip + " scip=" + scip + "\n");

// String mss = tokens.nextToken();


  • [ndt] r361 committed - [Fixed issue #46]: JavaScript API now returns public IP of clients whe..., ndt, 06/08/2010

Archive powered by MHonArc 2.6.16.

Top of Page