Yifan Gu

- some random dude

Recent Posts

Crossing the Mixed Content Boundary: abusing STUN/TURN as a Communication Channel

TL;DR: You can send and receive data using TURN by encoding data into username and IPv6 UDP address. Say that you have a HTTPS website. Modern web safety forbids it from accessing insecure parts of the network using HTTP. This is usually not an issue, since signing a HTTPS certificate for a website is fairly… Continue reading Crossing the Mixed Content Boundary: abusing STUN/TURN as a Communication Channel

Read More

IPv4 Network Address Translation for Steam (NAT4S)

TL;DR – I made Steam multiplayer possible with classic LAN games through a project called PartyLAN. It enables network address translation (NAT) between IPv4 and Steam IDs. Network address translation (NAT) is not an obscure concept – it has been in use since 1994. The basic idea is simple: a router, either software or hardware,… Continue reading IPv4 Network Address Translation for Steam (NAT4S)

Read More

Janky NTP – Setting System Time Using HTTP

I often find myself fighting with using NTP on linux machines – usually something goes wrong: maybe ntpdate isn’t there, or for some reason UDP is blocked, or maybe for some reason it just doesn’t want to do it. Here’s my janky version of ntpdate that overcomes those issues: Here’s ChatGPT explaining this bash one-liner… Continue reading Janky NTP – Setting System Time Using HTTP

Read More

File System as Partition Table

If you squint really hard – a partition table is basically a filesystem with only a handful of files – a partition table of, say, 4 partitions, is conceptually pretty much the same as a filesystem with only 4 files in it – the filesystem labels are the filenames, and the partitions are just the… Continue reading File System as Partition Table

Read More

CRT Miniature Arcade Cabinet

Hey I did a thing – a raspberry pi powered miniature arcade cabinet – with an actual real 4-inch monochrome CRT. Next step – port WASM4 to RPi0 (or wait for someone to do that).

Read More