I would like to have a Java program running on network A have a ServerSocket living on another network B through a proxy. I have played with a SOCKS5 proxy (which works) but it appears that all the proxy facilities in Java only work with client connections, not with ServerSockets (no constructor taking a Proxy argument). Asking Google gives much hay and few needles.
What is the approach I should take to get this running?
If a specific client is better than a generic SOCKS or web proxy then fine, but it needs to be Java (that leaves sshd out).
Target JVM is preferrably Java 5, and then Java 6.