Skip to content

Instantly share code, notes, and snippets.

@wkrp
wkrp / dnstt-client-plugin
Last active July 13, 2023 08:30
Proof-of-concept Shadowsocks plugin for dnstt (DNS tunnel)
#!/bin/bash
# ss-local -s 0.0.0.1 -p 1 -l 1080 -k password --plugin dnstt-client-plugin --plugin-opts 'doh=https://doh.example/dns-query;domain=<domain>;pubkey=<pubkey>'
DNSTT_CLIENT="./dnstt-client"
unset TRANSPORT RESOLVER PUBKEY DOMAIN
IFS=";" read -a OPTIONS <<<"$SS_PLUGIN_OPTIONS"
for opt in "${OPTIONS[@]}"; do
IFS="=" read key value <<<"$opt"