Last active
January 3, 2024 10:11
-
-
Save T-X/ed00a8f8bfb6d675e89667e08f73841d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# On a Linux laptop connected to a Gluon node: | |
$ sudo ip -6 route add ff1e::1337:2342/128 dev wlp1s0 table local | |
$ alias mcchat='function _mcchatfunc() { local addr="$1"; local addr2="$1"; local port="$2"; local iface="$3"; echo "$addr" | grep -q "ff.[12]" && addr2="$1%$3"; [ "$addr" != "$addr2" ] || /bin/ip -6 r get "$addr" | grep -q "dev $iface" || echo "Warning: no route, try: ip -6 route add $addr/128 dev $iface table local"; socat -u - UDP6-SENDTO:"[$addr2]:$port" | socat -u UDP6-RECV:$port,reuseaddr,ipv6-join-group="[$addr]:$iface" - | while read i; do echo -e "\033[31;1;4mrecv:\033[0m $i"; done }; _mcchatfunc $@' | |
$ mcchat ff1e::1337:2342 1234 wlp1s0 | |
nfgnf | |
recv: nfgnf | |
recv: hello | |
oooh | |
recv: oooh | |
no | |
recv: no | |
yeah | |
recv: yeah | |
hell yeah | |
recv: hell yeah | |
recv: upsala |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment