Transferring files between two computers/phones/devices right next to each other, regardless of operating system.

Most solutions rely on sending a file to some server in probably a different country, and then downloading said file on the other computer. Or, using a USB stick to pass the file from one to the other.

$ cd /directory/with/files/you/want/to/share

$ python3 -m http.server 1337

Then just connect to the IP and Port of the machine hosting the python http server and transfer away.

Aside from Bluetooth I'm not sure how you'd do this without using a LAN or WAN.

I think croc is a superior solution here. Encrypted transfer. Automatic local peer detection. Human speakable commands. Turns off when you’re done. No firewall fiddling (and unfiddling)

Pythons web server is single threaded I believe so any simultaneously connections break.

https://github.com/schollz/croc