Last active
April 1, 2025 15:17
-
-
Save ljjjustin/585e817d1d7ce4eb75b87076e5b7aa7e to your computer and use it in GitHub Desktop.
Revisions
-
ljjjustin revised this gist
Jun 21, 2017 . 1 changed file with 11 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ #!/bin/bash if [ $# -ne 2 ]; then echo "usage: $0 <listen port> <unix socket file>" exit fi PORT=$1 SOCK=$2 socat -d -d -d -lf ns-socat.log TCP-LISTEN:${PORT},reuseaddr,fork UNIX-CLIENT:${SOCK} -
ljjjustin created this gist
Jun 21, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ #!/bin/bash if [ $# -ne 3 ]; then echo "usage: $0 <unix socket file> <host> <listen port>" exit fi SOCK=$1 HOST=$2 PORT=$3 socat -d -d -d -lf socat.log UNIX-LISTEN:${SOCK},reuseaddr,fork TCP:${HOST}:${PORT}