Update net/socat to 1.8.1.3 for lifting socat to a newer branch.
1.7 won't get updates anymore and is lacking new features.
New in 1.8
- Support for network namespaces (option netns)
- TCP client now automatically tries all addresses (IPv4 and IPv6)
provided by nameserver until success
- Implementation of POSIX message queue (mq) control and access on Linux
(addresses POSIXMQ-READ and following)
- New wrapper script socat-chain.sh allows to stack two addresses,
e.g.HTTP proxy connect over SSL
- New script socat-mux.sh allows n-to-1 / 1-to-n communications
- New script socat-broker.sh allows group communications
- Experimental socks5 client feature
- Address ACCEPT-FD for systemd "inetd" mode
- UDP-Lite and DCCP address types
- Addresses SOCKETPAIR and SHELL
- New option bind-tmpname allows forked off children to bind UNIX domain
client sockets to random unique pathes
- New option retrieve-vlan (with INTERFACE addresses) now makes kernel
keep VLAN tags in incoming packets
- Simple statistics output with Socat option --statistics and with SIGUSR1
- A couple of new options, many fixes and corrections, see file CHANGES
Full changelog: http://www.dest-unreach.org/socat/CHANGES
#### Changes to the port
- shells/bash is a RUNDEP now
- socat (man/bin) are installed as socat1 and symlinked
- two patches are obsolete
- dropped do-test. There are >600 tests, 32 fail and ~190 cannot be
performed inside the build environment anyways
I made a short test with net/haproxy and security/acme.sh (standalone mode).
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/socat/Makefile,v
retrieving revision 1.25
diff -u -p -r1.25 Makefile
--- Makefile 27 Sep 2023 14:18:33 -0000 1.25
+++ Makefile 2 Nov 2026 13:21:54 -0000
@@ -1,6 +1,6 @@
COMMENT= relay for bidirectional data transfer
-DISTNAME= socat-1.7.4.1
+DISTNAME= socat-1.8.1.3
CATEGORIES= net
HOMEPAGE= http://www.dest-unreach.org/socat/
@@ -14,10 +14,7 @@ SITES= ${HOMEPAGE}/download/
WANTLIB= c readline crypto util ssl
-TEST_DEPENDS= shells/bash
-
-do-test:
- cd ${WRKSRC} && ${SETENV} bash test.sh
+RUN_DEPENDS= shells/bash
CONFIGURE_STYLE=gnu
@@ -29,7 +26,7 @@ pre-build:
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/socat
-.for file in FAQ README SECURITY doc/xio.help doc/*.html doc/dest-unreach.css
+.for file in FAQ README SECURITY doc/*.html doc/dest-unreach.css
${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/share/doc/socat
.endfor
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/socat
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/socat/distinfo,v
retrieving revision 1.15
diff -u -p -r1.15 distinfo
--- distinfo 20 Mar 2021 16:24:37 -0000 1.15
+++ distinfo 2 Nov 2026 13:21:54 -0000
@@ -1,2 +1,2 @@
-SHA256 (socat-1.7.4.1.tar.gz) = DH5jUHCvG5A3/ZaGn8RerPmEXLVFR2gd6diFBEU4c20=
-SIZE (socat-1.7.4.1.tar.gz) = 648888
+SHA256 (socat-1.8.1.3.tar.gz) = BmAv/VkemMdbPcHWbw8ZE2zGZrCy2Vyq2YfWqyyygJc=
+SIZE (socat-1.8.1.3.tar.gz) = 767082
Index: patches/patch-doc_socat_1
===================================================================
RCS file: /cvs/ports/net/socat/patches/patch-doc_socat_1,v
retrieving revision 1.9
diff -u -p -r1.9 patch-doc_socat_1
--- patches/patch-doc_socat_1 11 Mar 2022 19:47:34 -0000 1.9
+++ patches/patch-doc_socat_1 2 Nov 2026 13:21:54 -0000
@@ -1,32 +1,33 @@
Index: doc/socat.1
--- doc/socat.1.orig
+++ doc/socat.1
-@@ -3639,11 +3635,11 @@ connection, invokes a shell\&. This shell has its stdi
- connected to the TCP socket (nofork)\&. The shell starts filan and lets it
print the socket addresses to
- stderr (your terminal window)\&.
- .IP
--.IP "\fB\f(CWecho \-e \(dq\&\e0\e14\e0\e0\ec\(dq\& |socat \-u \- file:/usr/bin/squid\&.exe,seek=0x00074420\fP\fP"
-+.IP "\fB\f(CWecho \-e \(dq\&\e0\e14\e0\e0\ec\(dq\& |socat \-u \-
file:${LOCALBASE}/bin/squid\&.exe,seek=0x00074420\fP\fP"
-
+@@ -4536,12 +4536,12 @@ creates a shell in the current terminal that provides
+ \fBecho -e "\\0\\14\\0\\0\\c" |
+ socat -u - \\
+ \.RS
+-\fBFILE:/usr/bin/squid.exe,seek=0x00074420\fP
++\fBFILE:/${LOCALBASE}/bin/squid.exe,seek=0x00074420\fP
+ \.RE
+ \.fi
.IP
functions as primitive binary editor: it writes the 4 bytes 000 014 000 000 to
--the executable /usr/bin/squid at offset 0x00074420 (this is a real world patch
-+the executable ${LOCALBASE}/bin/squid at offset 0x00074420 (this is a real
world patch
- to make the squid executable from Cygwin run under Windows, actual per May
2004)\&.
+-the executable /usr/bin/squid\&.exe at offset 0x00074420 (this was a real
world patch
++the executable /${LOCALBASE}/bin/squid\&.exe at offset 0x00074420 (this was a
real world patch
+ to make the squid executable from Cygwin run under Windows, in 2004)\&.
.IP
- .IP "\fB\f(CWsocat \- tcp:www\&.blackhat\&.org:31337,readbytes=1000\fP\fP"
-@@ -3810,11 +3806,11 @@ error\&.
+ \.LP
+@@ -4876,11 +4876,11 @@ error\&.
.SH "FILES"
.PP
-/usr/bin/socat
-+${LOCALBASE}/bin/socat
++/${LOCALBASE}/bin/socat
.br
-/usr/bin/filan
-+${LOCALBASE}/bin/filan
++/${LOCALBASE}/bin/filan
.br
-/usr/bin/procan
-+${LOCALBASE}/bin/procan
++/${LOCALBASE}/bin/procan
.PP
- .SH "ENVIRONMENT VARIABLES"
+ .SH "SIGNALS"
Index: patches/patch-doc_socat_html
===================================================================
RCS file: /cvs/ports/net/socat/patches/patch-doc_socat_html,v
retrieving revision 1.4
diff -u -p -r1.4 patch-doc_socat_html
--- patches/patch-doc_socat_html 11 Mar 2022 19:47:34 -0000 1.4
+++ patches/patch-doc_socat_html 2 Nov 2026 13:21:54 -0000
@@ -1,29 +1,29 @@
Index: doc/socat.html
--- doc/socat.html.orig
+++ doc/socat.html
-@@ -3509,10 +3505,10 @@ connection, invokes a shell. This shell has its stdin
- connected to the TCP socket (<a href="socat.html#OPTION_NOFORK">nofork</a>). The shell starts filan and lets it print the socket addresses to
- stderr (your terminal window).
- <p>
--<p><dt><strong><strong><code>echo -e "\0\14\0\0\c" |socat -u -
file:/usr/bin/squid.exe,seek=0x00074420</code></strong></strong><dd>
-+<p><dt><strong><strong><code>echo -e "\0\14\0\0\c" |socat -u -
file:${LOCALBASE}/bin/squid.exe,seek=0x00074420</code></strong></strong><dd>
+@@ -4382,10 +4382,10 @@ creates a shell in the current terminal that provides
+
+ <hr><div class="shell">echo -e "\0\14\0\0\c" |
+ socat -u - \
+- FILE:/usr/bin/squid.exe,seek=0x00074420</div>
++ FILE:/${LOCALBASE}/bin/squid.exe,seek=0x00074420</div>
<p>
functions as primitive binary editor: it writes the 4 bytes 000 014 000 000 to
--the executable /usr/bin/squid at offset 0x00074420 (this is a real world patch
-+the executable ${LOCALBASE}/bin/squid at offset 0x00074420 (this is a real
world patch
- to make the squid executable from Cygwin run under Windows, actual per May
2004).
+-the executable /usr/bin/squid.exe at offset 0x00074420 (this was a real world
patch
++the executable /${LOCALBASE}/bin/squid.exe at offset 0x00074420 (this was a
real world patch
+ to make the squid executable from Cygwin run under Windows, in 2004).
<p>
- <p><dt><strong><strong><code>socat -
tcp:www.blackhat.org:31337,readbytes=1000</code></strong></strong><dd>
-@@ -3669,9 +3665,9 @@ error.
+
+@@ -4755,9 +4755,9 @@ error.
<a name="FILES"></a>
<h2>FILES</h2>
<p>
-/usr/bin/socat <br>
-/usr/bin/filan <br>
-/usr/bin/procan
-+${LOCALBASE}/bin/socat <br>
-+${LOCALBASE}/bin/filan <br>
-+${LOCALBASE}/bin/procan
++/${LOCALBASE}/bin/socat <br>
++/${LOCALBASE}/bin/filan <br>
++/${LOCALBASE}/bin/procan
<p>
- <a name="ENVIRONMENT_VARIABLES"></a>
- <h2>ENVIRONMENT VARIABLES</h2>
+ <a name="SIGNALS"></a>
+ <h2>SIGNALS</h2>
Index: patches/patch-fdname_c
===================================================================
RCS file: patches/patch-fdname_c
diff -N patches/patch-fdname_c
--- patches/patch-fdname_c 11 Mar 2022 19:47:34 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,21 +0,0 @@
-Index: fdname.c
---- fdname.c.orig
-+++ fdname.c
-@@ -254,10 +254,14 @@ int sockname(int fd, FILE *outfile, char style) {
-
- #if defined(SO_PROTOCOL) || defined(SO_PROTOTYPE)
- #if HAVE_GETPROTOBYNUMBER_R
-- rc = getprotobynumber_r(proto, &protoent, protoname, sizeof(protoname),
&protoentp);
-- if (protoentp == NULL) {
-+ struct protoent_data pdata;
-+ memset(&protoent, 0, sizeof(protoent));
-+ memset(&pdata, 0, sizeof(pdata));
-+ rc = getprotobynumber_r(proto, &protoent, &pdata);
-+ protoentp = &protoent;
-+ if (rc == -1) {
- Warn2("sockname(): getprotobynumber_r(proto=%d, ...): %s",
-- proto, strerror(rc));
-+ proto, strerror(errno));
- }
- strncpy(protoname, protoentp->p_name, sizeof(protoname));
- #elif HAVE_GETPROTOBYNUMBER
Index: patches/patch-test_sh
===================================================================
RCS file: patches/patch-test_sh
diff -N patches/patch-test_sh
--- patches/patch-test_sh 11 Mar 2022 19:47:34 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
---- test.sh.orig Sat Jan 24 11:15:22 2015
-+++ test.sh Mon Apr 13 14:58:09 2015
-@@ -576,9 +576,6 @@ filloptionvalues() {
- *,dh,*) OPTS=$(echo "$OPTS" |sed "s/,dh,/,dh=/tmp/hugo,/g");;
- esac
- case "$OPTS" in
-- *,egd,*) OPTS=$(echo "$OPTS" |sed "s/,egd,/,egd=/tmp/hugo,/g");;
-- esac
-- case "$OPTS" in
- *,compress,*) OPTS=$(echo "$OPTS" |sed "s/,compress,/,compress=none,/g");;
- esac
- # PROXY
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/socat/pkg/PLIST,v
retrieving revision 1.6
diff -u -p -r1.6 PLIST
--- pkg/PLIST 11 Mar 2022 19:47:34 -0000 1.6
+++ pkg/PLIST 2 Nov 2026 13:21:54 -0000
@@ -1,7 +1,12 @@
@bin bin/filan
@bin bin/procan
-@bin bin/socat
+bin/socat
+bin/socat-broker.sh
+bin/socat-chain.sh
+bin/socat-mux.sh
+@bin bin/socat1
@man man/man1/socat.1
+@man man/man1/socat1.1
share/doc/socat/
share/doc/socat/FAQ
share/doc/socat/README
@@ -12,17 +17,20 @@ share/doc/socat/socat-multicast.html
share/doc/socat/socat-openssltunnel.html
share/doc/socat/socat-tun.html
share/doc/socat/socat.html
-share/doc/socat/xio.help
share/examples/socat/
share/examples/socat/daemon.sh
share/examples/socat/ftp.sh
-share/examples/socat/gatherinfo.sh
share/examples/socat/mail.sh
share/examples/socat/proxy.sh
share/examples/socat/proxyecho.sh
share/examples/socat/readline-test.sh
share/examples/socat/readline.sh
+share/examples/socat/socat-broker.sh
+share/examples/socat/socat-chain.sh
+share/examples/socat/socat-mux.sh
share/examples/socat/socat_buildscript_for_android.sh
share/examples/socat/socks4a-echo.sh
share/examples/socat/socks4echo.sh
+share/examples/socat/socks5server-auth.sh
+share/examples/socat/socks5server-echo.sh
share/examples/socat/test.sh
--
Mark Patruck ( mark at wrapped.cx )
GPG key 0xF2865E51 / 187F F6D3 EE04 1DCE 1C74 F644 0D3C F66F F286 5E51
https://www.wrapped.cx