-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
via https://gist.github.com/ShikChen/b6664174d8ed067bb610dba0ca805335
安裝 websocat
修改 proxy.sh
懶得寫判斷了,大概意思是...
--- proxy.sh.bak 2022-12-15 14:40:45.000000000 +0800
+++ proxy.sh 2022-12-15 14:58:12.000000000 +0800
@@ -1,7 +1,11 @@
#!/usr/bin/env bash
echo "Connecting to BBS via Websockets..."
BASEDIR=$(dirname "$0")
-echo "$BASEDIR/usock2wsock" -u $1 -r $2
-"$BASEDIR/usock2wsock" -u $1 -r $2 &
+killall websocat > /dev/null 2>&1
+/usr/local/bin/websocat --oneshot --binary \
+ --ping-interval=10 \
+ --origin=https://term.gamer.com.tw \
+ tcp-l:127.0.0.1:1337 \
+ wss://term.gamer.com.tw/bbs &
sleep 2
-"$BASEDIR/telnet" -8 -u /tmp/telnetBYwebsocket.$2.sock
+"$BASEDIR/telnet" -8 localhost 1337
1337 是隨意指定的 port
Metadata
Metadata
Assignees
Labels
No labels