{"id":17983901,"url":"https://github.com/3ndg4me/socat","last_synced_at":"2025-03-25T19:33:00.513Z","repository":{"id":49807542,"uuid":"214758970","full_name":"3ndG4me/socat","owner":"3ndG4me","description":"Mirror of the socat source code with pre-built releases for Linux (x64 and x86), Windows (x64 and x86), and MacOS (x64)","archived":false,"fork":false,"pushed_at":"2019-10-22T01:12:16.000Z","size":686,"stargazers_count":169,"open_issues_count":1,"forks_count":29,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-05-02T04:57:34.511Z","etag":null,"topics":["binary","build","hacktoberfest","linux","macos","mirror","netcat","socat","windows"],"latest_commit_sha":null,"homepage":"http://www.dest-unreach.org/socat/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/3ndG4me.png","metadata":{"files":{"readme":"README","changelog":"CHANGES","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY","support":null}},"created_at":"2019-10-13T04:12:16.000Z","updated_at":"2024-05-01T16:13:08.000Z","dependencies_parsed_at":"2022-09-24T10:50:27.556Z","dependency_job_id":null,"html_url":"https://github.com/3ndG4me/socat","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3ndG4me%2Fsocat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3ndG4me%2Fsocat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3ndG4me%2Fsocat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3ndG4me%2Fsocat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/3ndG4me","download_url":"https://codeload.github.com/3ndG4me/socat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222090823,"owners_count":16929472,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binary","build","hacktoberfest","linux","macos","mirror","netcat","socat","windows"],"created_at":"2024-10-29T18:18:52.471Z","updated_at":"2024-10-29T18:18:53.080Z","avatar_url":"https://github.com/3ndG4me.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nabout\n-----\n\nsocat is a relay for bidirectional data transfer between two independent data\nchannels. Each of these data channels may be a file, pipe, device (serial line\netc. or a pseudo terminal), a socket (UNIX, IP4, IP6 - raw, UDP, TCP), an\nSSL socket, proxy CONNECT connection, a file descriptor (stdin etc.), the GNU\nline editor (readline), a program, or a combination of two of these. \nThese modes include generation of \"listening\" sockets, named pipes, and pseudo\nterminals.\n\nsocat can be used, e.g., as TCP port forwarder (one-shot or daemon), as an\nexternal socksifier, for attacking weak firewalls, as a shell interface to UNIX\nsockets, IP6 relay, for redirecting TCP oriented programs to a serial line, to\nlogically connect serial lines on different computers, or to establish a\nrelatively secure environment (su and  chroot) for running client or server\nshell scripts with network connections. \n\nMany options are available to refine socats behaviour:\nterminal parameters, open() options, file permissions, file and process owners,\nbasic socket options like bind address, advanced socket options like IP source\nrouting, linger, TTL, TOS (type of service), or TCP performance tuning.\n\nMore capabilities, like daemon mode with forking, client address check,\n\"tail -f\" mode, some stream data processing (line terminator conversion),\nchoosing sockets, pipes, or ptys for interprocess communication, debug and\ntrace options, logging to syslog, stderr or file, and last but not least\nprecise error messages make it a versatile tool for many different purposes.\n\nIn fact, many of these features already exist in specialized tools; but until\nnow, there does not seem to exists another tool that provides such a generic,\nflexible, simple and almost comprehensive (UNIX) byte stream connector.\n\n\npackages\n--------\n\nbefore bothering with compilers, dependencies and include files, you might\ntry to get a binary distribution that matches your platform. Have a look at \nthe projects home page for actual information regarding socat binary \ndistributions.\n\n\nplatforms\n---------\n\nsocat 1.7.0 was compiled and more or less successfully tested under the\nfollowing operating systems:\n\nDebian lenny/sid on x86, kernel 2.6.24\nFreeBSD 6.1 on x86\nNetBSD 4.0  on x86\nOpenBSD 4.3 on x86\nOpenSolaris 10 on x86 with gcc\nMac OS X 10.5.5 on iMac G5, with libreadline\nHP-UX 11.23\nAIX 5.3 on 64bit Power4 with gcc\nCygwin 1.5.25 on i686\n\ntests on Tru64 can no longer be performed because HP testdrive has taken down\nthese hosts.\n\nSome versions of socat have been reported to successfully compile under older\nLinux versions back to RedHat 2.1 (kernel 1.2.13, gcc 2.7.0), under AIX 4.1 and\n4.3, SunOS 5.7-5.8, FreeBSD 4.2 - 4.9, MacOS X 10.1, Cygwin, Solaris 8 on x86, \nOSR 5.0.6, NetBSD 1.6.1 and 2.0.2, OpenBSD 3.4 and 3.8, Tru64 5.1B, Mac OS X\n10.1-10.2, and HP-UX 11\n\nIt might well compile and run under other UNIX like operating systems.\n\n\ninstall\n-------\n\nGet the tarball and extract it:\n\ttar xzf socat.tar.gz\n\tcd socat-1.7.3.0\n\t./configure\n\tmake\n\tsu\n\tmake install\t# installs socat, filan, and procan in /usr/local/bin\n\nFor compiling socat, gcc (or egc) is recommended.\nIf gcc is not available, the configure script will fail to determine\nsome features; then you'd better begin with one of the Makefiles and config.h's\nfrom the Config directory.\n\nIf you have problems with the OpenSSL library, you can apply the option\n\"--disable-openssl\" to configure.\n\nIf you have problems with the readline library or (n)curses, you can apply the\noption \"--disable-readline\" to configure.\n\nIf you have problems with the tcp wrappers library, you can apply the option\n\"--disable-libwrap\" to configure.\n\nIf you still get errors or a tremendous amount of warnings you can exclude \nthe features for system call tracing and file descriptor analyzing by\napplying the options \"--disable-sycls --disable-filan\" to configure.\n\nYou still need the functions vsnprintf and snprintf that are in the GNU libc,\nbut might not be available with some proprietary libc's.\n\nThe configure script looks for headers and libraries of openssl, readline, and\ntcp wrappers in the OS'es standard places and in the subdirectories include/\nand lib/ of the following places: \n   /sw/\n   /usr/local/\n   /opt/freeware/\n   /usr/sfw/\nand for openssl also in:\n   /usr/local/ssl/\nIn case of unexpected behaviour it is important to understand that configure\nfirst searches for the appropriate include file and then expects to find the\nlibrary in the associated lib directory. That means, when e.g. a OpenSSL\ninstallation resides under /usr/local and there is a symbolic link from\n/usr/include/ssl/ssl.h to /usr/local/ssl/include/ssl/ssl.h, configure will find\nthe /usr/include/... header and will therefore expect libssl in /usr/lib\ninstead of /usr/local/...\n\nIf configure does not find a header file or library but you know where it is,\nyou can specify additional search locations, e.g.:\n   export LIBS=\"-L$HOME/lib\"\n   export CPPFLAGS=\"-I$HOME/include\"\nbefore running configure and make.\n\nFor other operating systems, if socat does not compile without errors, refer to\nthe file PORTING.\n\n\nplatform specifics - redhat\n---------------------------\n\nInstall the following packages before building socat:\n  tcp_wrappers-devel\n  readline-devel\n  openssl-devel\n\nOn RedHat Linux 9.0, including openssl/ssl.h might fail due to problems with\nthe krb5-devel package. configure reacts with disabling openssl integration. \nTo solve this issue, help cpp to find the krb5.h include file:\nCPPFLAGS=\"-I/usr/kerberos/include\" ./configure\n\n\nplatform specifics - aix\n------------------------\n\nThe flock() prototype is not available but the function is. Thus, to enable the\nsocat flock options, run configure and then change in config.h the line \n/* #undef HAVE_FLOCK */\nto\n#define HAVE_FLOCK 1\nand continue the build process.\n\nWhen using the OpenSSL rpm provided by IBM, configure might need the \nenvironment variable setting:\nLIBS=\"-L/opt/freeware/lib\"\n\nWhen using the OpenSSL bundle provided by IBM, egd needs to be installed too\nto get enough entropy.\n\nsocat compiles not only with gcc, but also with xlc. Just adapt the Makefile:\nreplace gcc by /usr/vac/bin/xlc and remove gcc specific options \n\"-Wall -Wno-parentheses\".\n\nWhen linking with the OpenSSL library provided by IBM, errors may occur:\nld: 0711-317 ERROR: Undefined symbol: .__umoddi3\nIn this case, you need to link with libgcc or compile libcrypt yourself using\nxlc, or disable SSL (in config.h, undefine WITH_OPENSSL and recompile)\n\nThe score of test.sh can be improved by uncommenting MISCDELAY=1 in this\nscript.\n\n\nplatform specifics - solaris\n----------------------------\n\nIf libreadline or libssl are in a directory not searched by the loader per\ndefault, e.g. /opt/sfw/lib, you must add this directory to $LD_LIBRARY_PATH,\nfor running both configure and the socat executables, e.g.:\nexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/sfw/lib\n\nFor some shell scripts, it is preferable to have /usr/xpg4/bin at a prominent\nposition in $PATH.\n\nWith the default compiler define _GNU_SOURCE, the CMSG_* macros are not\navailable, and therefore ancillary messages cannot be used. To enable these try\nthe following:\nAfter running ./configure, edit Makefile and replace \"-D_GNU_SOURCE\" with\n\"-D_XPG4_2 -D__EXTENSIONS__\" and run make\n\n\nplatform specifics - hp-ux\n--------------------------\n\nAncillary messages cannot be compiled in with socat: both struct msghdr and\nstruct cmsghdr are required. Compiling with -D_XOPEN_SOURCE_EXTENDED provides\nstruct msghdr but disables struct cmsghdr while -D_OPEN_SOURCE disables struct\nmsghdr but disables struct cmsghdr. Please contact socat development if you\nknow a solution.\n\nShutting down the write channel of a UNIX domain socket does not seem to\ntrigger an EOF on the peer socket. This makes problems with the exec and\nsystem addresses.\n\nThis OS provides the type \"long long\", but not the strtoll() function to read\ndata into a long long variable.\n\nUNIX domain sockets are only supported with SOCK_STREAM, not with datagrams\n(see man 7 unix).\n\nWith UDP sockets it seems to happen that the select() call reports available\ndata (or EOF) but a subsequent read() call hangs.\n\n\nplatform specifics - tru64\n--------------------------\n\nWhen the use of the readline address fails with an error like:\nsocat: /sbin/loader: Fatal Error: Reference to unresolvable symbol \"tgetent\" in \".../libreadline.so.4\"\nand you still want to use shared libraries, try the following workaround: \n$ make distclean; LIBS=\"-static\" ./configure\nremove the \"-static\" occurrence in Makefile\n$ make\n\n\ndocumentation\n-------------\n\nThese files reside in the doc subdirectory:\n\nsocat.1 is the man page, socat.html is the HTML based man page. It is actual,\nbut describes only the more useful options.\n\nxio.help is an older, but more exact description in text form; with socat\nversion 1.6.0 it is outdated.\n\ndoc/socat-openssltunnel.html is a simple tutorial for a private SSL connection.\ndoc/socat-multicast.html is a short tutorial for multicast and broadcast\ncommunications.\ndoc/socat-tun shows how to build a virtual network between two hosts.\n\nsocat.1 and socat.html can be generated from socat.yo (which is released with\nsocat 1.6.0.1 and later) using the yodl document language package. Maintenance\nof yodl had been discontinued by its author\n(http://www.xs4all.nl/~jantien/yodl/) (there seems to be a revival at\nhttp://yodl.sourceforge.net/ though). For socat, the old version 1.31 is used;\nan rpm is still distributed with recent OpenSuSE versions (confirmed for\nOpenSuSE 10.1 in suse/i586/yodl-1.31.18-1142.i586.rpm). It appears to install\nsmoothly also under RedHat Linux. After yodl 1.31 installation, the following\ncorrection must be performed in /usr/share/yodl/shared.yo in two places:\n\u003c whenhtml(htmlcommand(\u003c!)ARG1+htmlcommand(\u003e)))\n\u003e whenhtml(htmlcommand(\u003c!--)ARG1+htmlcommand(--\u003e)))\n\n\nlicense\n-------\n\nsocat is distributed under the terms of the GNU GPLv2;\nexcept for install-sh, which is copyright MIT, with its own license;\n\nIn addition, as a special exception, the copyright holder\ngives permission to link the code of this program with\nany version of the OpenSSL library which is distributed\nunder a license identical to that listed in the included\nCOPYING.OpenSSL file, and distribute linked combinations\nincluding the two. You must obey the GNU General Public\nLicense in all respects for all of the code used other\nthan OpenSSL. If you modify this file, you may extend this\nexception to your version of the file, but you are not\nobligated to do so. If you do not wish to do so, delete\nthis exception statement from your version.\n\n\n    This program is free software; you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, version 2 of the License\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program; if not, write to the Free Software\n    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\n\ncontact\n-------\n\nFor questions, bug reports, ideas, contributions etc. please contact\nsocat@dest-unreach.org\n\nFor socat source distribution, bug fixes, and latest news see\n        http://www.dest-unreach.org/socat/\n\nwww.socat.org is an alternate site providing the same contents.\n\npublic git repository:\n\tgit://repo.or.cz/socat.git\n\thttp://repo.or.cz/r/socat.git\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3ndg4me%2Fsocat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F3ndg4me%2Fsocat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3ndg4me%2Fsocat/lists"}