3 ![Screenshot_2023-11-08-23-38-22-47_40deb401b9ffe8e1df2f1cc5ba480b12](https://github.com/valorisa/socat-1.7.4.4_for_Windows/assets/13067566/c562ce4c-64e6-463b-8863-e9dd8e30d053)
5 socat (SOcket CAT: netcat on steroids) is a relay for bidirectional data transfer between two independent data
6 channels. Each of these data channels may be a file, pipe, device (serial line
7 etc. or a pseudo terminal), a socket (UNIX, IP4, IP6 - raw, UDP, TCP), an
8 SSL socket, proxy CONNECT connection, a file descriptor (stdin etc.), the GNU
9 line editor (readline), a program, or a combination of two of these.
10 These modes include generation of "listening" sockets, named pipes, and pseudo
13 Some of the examples of using socat are :
15 - TCP relay (one-shot or daemon)
17 - Shell interface to Unix sockets
19 - Netcat and rinetd replacement
20 - Redirecting TCP-oriented programs to a serial line
21 - Establishing a relatively secure environment (su and chroot) for running client or server shell scripts inside network connections.
23 <http://www.dest-unreach.org/socat/doc/socat.html#EXAMPLES>
25 ## socat-1.8.0.0 for Windows 7, 8.1, 10 & 11 & Server
27 socat 1.8.0.0-x86_64 for Windows 7, 8.1, 10 & 11 & Server
30 The procedure for those who want to compile from the source files.
32 Otherwise for the others, there are 2 ready-made files **'socat-1.8.0.0.rar'** and **'socat-1.8.0.0.zip'**.
33 You can download it by going to : [socat-1.8.0.0.rar](https://github.com/valorisa/socat-1.8.0.0_for_Windows/blob/main/socat-1.8.0.0.rar) or [socat-1.8.0.0.zip](https://github.com/valorisa/socat-1.8.0.0_for_Windows/blob/main/socat-1.8.0.0.zip) and proceeding by keyboard shortcut (Ctrl + Shift + s).
35 First of all, if it is not done yet, download and install Cygwin (last version) : <https://www.cygwin.com/setup-x86_64.exe>
37 ## 1. **Install additional Cygwin packages**
67 To do this, let us try to answer the following question : How to do install packages on Cygwin ?
68 Download the Cygwin installer and run setup.exe. Click Next through the defaults and select mirror for downloading packages. Search for each package, open the appropriate category (by example Net or PHP or other), and click Skip next to each package to select it for installation.
70 ## 2. **From Cygwin 3.5.3**
72 Please, don't forget to download socat source from <http://www.dest-unreach.org/socat/>
74 Run **Cygwin** via (Windows + R, 'mintty') and execute the following commands :
77 cd / && cd cygdrive/c/Users/<your_username>/Desktop [or cd / && cd %USERPROFILE%/Desktop if you use (Windows + R, 'cmd')]
79 wget http://www.dest-unreach.org/socat/download/socat-1.8.0.0.tar.gz
81 tar -xvzf socat-1.8.0.0.tar.gz
92 ## 3. **From Windows Explorer**
94 After compilation, copy _'socat-1.8.0.0'_ directory to %ProgramFiles% or an other location. You have to copy the directory totally and not only 'socat.exe', otherwise it won't work.
98 From the Mugane's comment :
100 May also want to add that it is best to use Powershell (as Admin) to install these packages for cygwin if using cyg-get :
103 cyg-get gcc-g++ gcc-core make gcc-fortran gcc-objc gcc-objc++ libkrb5-devel libkrb5_3 libreadline-devel libssl-devel libwrap-devel tcp_wrappers
106 If you don't use powershell, and try to install from cygwin itself (even as Administrator) you may run into gnarly cryptic missing dll errors and end up needing to remove/reinstall cygwin itself to correct the problems.
108 If users don't have cygwin, I recommend [chocolatey](https://chocolatey.org/install) (again from Powershell as admin) :
111 choco install -y cygwin cyg-get