websocat icon indicating copy to clipboard operation
websocat copied to clipboard

`invalid socket address syntax` when using alternative transport for `ws-listen`

Open milliero-se opened this issue 1 year ago • 2 comments

Using alternative transport for ws-listen does not appear to work as described in the documentation. The invocations

websocat ws-l:tcp-l:127.0.0.1:8808 reuse:-
websocat ws-c:ws-l:ws-c:- tcp:127.0.0.1:5678

from the documentation both result in

websocat: invalid socket address syntax

My particular use case involves something like ws-l:tcp:*:* tcp:*:* like the connect-connect side of a "TCP gender changer".

websocat --version reports 1.13.0.

Btw this program is awesome. Thanks so much for your hard work. :)

milliero-se avatar Aug 31 '24 02:08 milliero-se

Maybe you meant ws-u:, i.e. ws-upgrade: instead of ws-l:?

ws-l: basically means ws-u:tcp-l:, so your command line is interpreted as ws-u:tcp-l:tcp-l:127.0.0.1:8808 and it parses tcp-l:127.0.0.1:8808 as a socket address.

vi avatar Aug 31 '24 12:08 vi

Ah, thank you! Those examples I pulled from the documentation are just typos/out of date then. I will experiment with ws-u.

Do you have a donation link somewhere? I'd love to buy you a coffee or two.

milliero-se avatar Aug 31 '24 17:08 milliero-se