question: private DatagramSocket createOrGetRelaySocket ( SocketAddress originalSocketAddress ) { if ( ! proxySocketsByOriginalAddress . containsKey ( originalSocketAddress ) ) { try { DatagramSocket relaySocket = new DatagramSocket ( new InetSocketAddress ( getLoopbackAddress ( ) , 0 ) ) ; logger . debug ( "Mapping peer {} to relay socket {}" , originalSocketAddress , relaySocket . getLocalSocketAddress ( ) ) ; proxySocketsByOriginalAddress . put ( originalSocketAddress , relaySocket ) ; readSocket ( threadPoolExecutor , relaySocket , null ) ; } catch ( SocketException e ) { throw new RuntimeException ( e ) ; } } return proxySocketsByOriginalAddress . get ( originalSocketAddress ) ; }
target:  Opens a local UDP socket that serves as a proxy for a peer to FA. In other words, instead of connecting to peer X directly, a local port is opened which represents that peer. FA will then data to this port, thinking it's peer X. All data received on that port is then forwarded to the original peer and any data received on the public UDP socket is forwarded through its peer socket.