[gsocks] a more general forward interface
[gsocks] bugfix in wait_for_first_udp