On connection the displayed port in the upload screen is the port the OS assigns for this connection. It is not related to the listening ports on either side.
During the upload handshake the host exchange HTTP headers. If the header Listen-IP or X-My-Address is received the port is read from these headers.
If you set the value
Upload.UploadStateLogBufferSize = 100000
in your phexCorePrefs.properties you will enable an upload log buffer of 100K, a button is displayed on the upload screen and clicking it shows you the header exchange.
__________________ |