JavaScript DNS-SD



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

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

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

Gist: https://gist.github.com/sskaje/974ec85b39f51dd3a4c6734c2bfb214f



JavaScript DNS-SD by @sskaje: https://sskaje.me/2020/05/javascript-dns-sd/

MH: A CLI based Memory Editor for iOS/macOS

I write this project just because I don’t like those game memory editor like igg.

Code: https://github.com/sskaje/mh

CMake is required for building. Build scripts already included in build/.

Leave an issue if there’s any bugs/feature requests.

MH: A CLI based Memory Editor for iOS/macOS by @sskaje: https://sskaje.me/2018/03/mh-cli-based-memory-editor-ios-macos/

Incoming search terms:

unzip with lzfse support

LZFSE is a compression library introduced by Apple.

LZFSE is a Lempel-Ziv style data compression algorithm using Finite State Entropy coding. It targets similar compression rates at higher compression and decompression speed compared to deflate using zlib.

Github: https://github.com/lzfse/lzfse

Apple uses LZFSE compressing its ipa packages.
I downloaded an ipa directly from appstore, named like pre-thinned xxx .thinned.signed.dpkg.ipa, e.g. pre-thinned12345678.thinned.signed.dpkg.ipa

I tried to decompress this ipa, with unzip, 7-Zip on windows, many many other archiver management tools, all failed.

unsupported compression method 99

I integrated lzfse into unzip based on unzip-6.0.
Github: https://github.com/sskaje/unzip-lzfse

Steps:
1 Build and install lzfse

2 Build unzip-lzfse

3 test

Tested under macOS 10.12.6

unzip with lzfse support by @sskaje: https://sskaje.me/2017/08/unzip-with-lzfse-support/

Incoming search terms:

Instagram iOS Signature Algorithm (ig_sig_key_version=5)

ig_sig_key_version=4的到处都是。
ig_sig_key_version=5的没找到。

你知道是HMAC-SHA256。

所以,你以为是 4749bda4fc1f49372dae3d79db339ce4959cfbbe ?

那你被骗了。

You are not authorised to read all content in this post.

Please login…

Instagram iOS Signature Algorithm (ig_sig_key_version=5) by @sskaje: https://sskaje.me/2017/07/instagram-ios-signature-algorithm-ig_sig_key_version5/

Incoming search terms:

20分钟搭建一个自用的DDNS服务

08年的时候,在学校,花了点时间做了个ddns服务,不知道现在是否还活着,ddns.bitunion.org。
当时的方案,powerdns + mysql + php ui,php ui是自己做的,简单地做了个校内邮箱的校验,使用了个简单的token机制来更新记录。

这回,有个需求是需要做一个ttl < 10的ddns服务,之前所有域名都在dns.he.net上,最小ttl限制到了300,这样以来,更新的延迟特定场景下不够用。 自用DDNS的需求里,域名不会被广泛知晓并使用,否则NS服务器的压力会是个问题。

方案还是一样,powerdns + mysql,写了个最简单的http接口页面给ddclient用。

服务器是 ubuntu 17.04,公网IP 1.2.3.4.
目标域名 xxx.ddns.sskaje.me

安装软件

按下列命令安装必备软件,全默认

配置powerdns

考虑到现在的linux服务器,本地53端口经常被占用,所以需要修改 /etc/powerdns/pdns.conf,指定监听的IP

配置zone和records

在sskaje.me的域名服务器上,添加NS记录 ddns.sskaje.me,指向IP 1.2.3.4。考虑到未来可能改IP,可以加一个A记录 ddns1.sskaje.me,指向 1.2.3.4,这样ddns.sskaje.me的NS设置成 ddns1.sskaje.me。

创建zone

更正SOA记录

添加 xxx.ddns.sskaje.me,设置ttl=10

简单的更新脚本

DynDNS的更新接口参数类似:

认证使用 http basic auth 完成的。

所以一个简单的服务端脚本

20分钟搭建一个自用的DDNS服务 by @sskaje: https://sskaje.me/2017/07/set-up-simple-ddns-server-in-20-minutes/

Incoming search terms: