JavaScript DNS-SD

用了 npm 包 multicast-dns 。其他几个包也试过了,各种残废,要不想太多要不瞎搞,还是这个单纯。

核心的环节是,正确地响应 “_services._dns-sd._udp.local” 的query。

响应的包 answers 放 PTR,additional records 放 SRV、TXT、A。TXT可以放多个 key=value,来处理自定义配置,例如端口、是否加密,认证等信息。


JavaScript DNS-SD by @sskaje:

JPEG 自动旋转


使用 jhead

jhead -autorot xxx.jpg

JPEG 自动旋转 by @sskaje:

WireGuard as a “Switch”

Not really a switch, but similar. If you want to exchange data from two network using a host on Internet, this post helps.

In this case, Router 1 want to use Router 2 as gateway for some destinations. All 3 Nodes here have Internet public IP address.

I set-up a network,, using WireGuard. Our work are all on the Server in the middle.

If I put such config to /etc/wireguard/wg0.conf and run wg-quick up wg0, then I may lost connection to the server, because of the default route.

Now, add a route table to your system and change wg0.conf, let’s name it wgswitch and table id 201.

Then modify wg0.conf.

Now when you establish connections, you’ll be able to ping from router1 to router2 using network.

But if you want to try a custom network, that’s not enough, you need extra route and ip rule for your network

WireGuard as a “Switch” by @sskaje:

List of macOS Installer Download Links

10.15 Catalina

AppStore only, you need a macOS < 10.15 to download this installer

10.14 Mojave

AppStore only, you need a macOS < 10.14 to download this installer

10.13 High Sierra

AppStore only, you need a macOS < 10.13 to download this installer

10.12 Sierra

10.11 El Captain

10.10 Yosemite

10.9 Mavericks or earlier


List of macOS Installer Download Links by @sskaje: