1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-11-09 18:59:02 -08:00

add websocat support to burl

This commit is contained in:
Connor Olding 2024-07-15 03:48:15 -07:00
parent 03b90f9c9c
commit f53e9865df

View file

@ -46,6 +46,8 @@ burl() ( ### @-
then wrapped() { process busybox nc -- "$@" ;} then wrapped() { process busybox nc -- "$@" ;}
elif socat /dev/null /dev/null elif socat /dev/null /dev/null
then wrapped() { process socat - "TCP:$1:$2" ;} then wrapped() { process socat - "TCP:$1:$2" ;}
elif websocat; [ $? = 1 ]
then wrapped() { websocat --binary - "tcp:$1:$2" ;}
elif curl; [ $? = 2 ] elif curl; [ $? = 2 ]
then wrapped() { process curl "telnet://$1:$2" ;} then wrapped() { process curl "telnet://$1:$2" ;}
else return 127 else return 127