Port Forwarding

后端 未结 3 1703
旧巷少年郎
旧巷少年郎 2021-02-15 13:01

I have a simple requirement of a software level port forwarding/tunnelling of socket based communication.

  • I have a source server and port using Sockets. This is a
3条回答
  •  無奈伤痛
    2021-02-15 13:15

    You can try netcat or socat (it's more powerful than netcat)

    An example for socat to forward port 80 using tcp4:

    socat tcp4-listen:80,fork tcp4:{another server}:{another port}
    

    and refer to http://en.wikipedia.org/wiki/Netcat#Port_Forwarding_or_Port_Mapping for netcat

    Both are not java-related.

提交回复
热议问题