socat TCP-LISTEN:9090,fork TCP:127.0.0.1:9999
※ 다운로드
http://www.dest-unreach.org/socat/
※ 컴파일 방법
extract the archive issuing the following command:
# tar zxvf socat-2.0.0-b5.tgz
cd into the socat source directory
# cd socat-2.0.0-b5
run the configure script:
# ./configure
run the make command to build the application
# make
10 errors generated.
make: *** [xio-ip6.o] Error 1
as you can see there are undeclared IPv6 identifiers. To solve this problem you have to add the following line at the beginning of xio-ip6.c:
#define __APPLE_USE_RFC_2292
You can issue the following command or you can edit xio-ip6.c with your favorite editor:
# echo '#define __APPLE_USE_RFC_2292' > temp_file.c
# cat xio-ip6.c >> temp_file.c
# mv temp_file.c xio-ip6.c
http://www.xappsoftware.com/wordpress/2013/10/10/how-to-run-socat-on-mac-os-x/