🔴 Note: this article is obsolete. This cross-compilation direction may just work out of the box. 🔴
Let's create a dummy project for a test.
$ cargo new test
[package] | |
name = "hackyws" | |
version = "0.1.0" | |
edition = "2021" | |
[dependencies] | |
anyhow = "1.0.66" | |
async-executor = "1.5.0" | |
async-tungstenite = "0.18.0" |
#!/bin/sh | |
schedtool -R -p 2 -e /usr/bin/socat tcp-l:5555,fork,reuseaddr system:'printf "HTTP/1.0\\\\x20200\\\\x20OK\\\\r\\\\nContent-Type\:\\\\x20video/x-matroska\\\\r\\\\n\\\\r\\\\n" && ffmpeg -f video4linux2 -ss 2 -i /dev/video0 -ss 2 -f oss -ac 1 -i /dev/dsp -s 320x240 -vcodec libx264 -vpre ultrafast -b 300k -ar 22050 -acodec libmp3lame -ab 32k -f matroska pipe\:1 < /dev/null' |
Primary use case: workaround non-working "ip link set wlan0 netns ..." for some network drivers. | |
Secondary use case: simple demo for getting/setting the MAC address, tun/tap, raw sockets... | |
Pre-built version: http://vi-server.org/pub/tap_copy |
#!/bin/bash | |
# Setup encrypted IPv4 tunnel over IPv4 or IPv6 on two Linux nodes using SSH for tunnel setup. | |
# Requires only ipsec-tools, iproute2, ssh and necessry kernel modules locally and remotely. | |
# Warning: it flushes IPsec settings both locally and remotely. | |
# Don't use with other IPsec tunnnels. | |
# Sample usage: | |
# simplevpn -6 fc::1 fc::2 ssh -T root@fc::2 |
#!/bin/bash | |
set -e | |
if [ -z "$2" ]; then | |
echo "Script to set up router advertising proxy for one peer" | |
echo "Usage: setup_ipv6_hacky_router UPLINK DOWNLIK" | |
echo "Example: setup_ipv6_hacky_router eth0 wlan0" | |
exit 1 | |
fi |
#!/bin/bash | |
IN=$1 | |
OUT=$2 | |
true ${SD_PARAMS:="-55dB:d=0.3"}; | |
true ${MIN_FRAGMENT_DURATION:="20"}; | |
export MIN_FRAGMENT_DURATION | |
if [ -z "$OUT" ]; then |
#!/bin/bash | |
set -e | |
TOKEN=... | |
USERNAME=... | |
D=$(mktemp -d) | |
cd "$D" | |
P=1 |
// Pre-built static i386 version: http://vi-server.org/pub/no_new_privs | |
#include <unistd.h> | |
#include <string.h> | |
#include <stdio.h> | |
#include <sys/prctl.h> | |
int main(int argc, char* argv[]) | |
{ | |
if (argc == 1 || !strcmp(argv[1], "--help")) { |
I hereby claim:
To claim this, I am signing this object: