Skip to content

Instantly share code, notes, and snippets.

@qdm12
qdm12 / main.go
Last active February 12, 2024 01:17
DNS over HTTPS server resolver under 300 lines of clean Go code
package main
import (
"bytes"
"context"
"crypto/tls"
"errors"
"fmt"
"io/ioutil"
"log"
#!/usr/local/bin/bash
# pkg install bash
# add to shellcmd as "/root/push_ip_metrics.sh &" via Services/shellcmd
pushgatewayip="192.168.1.2:9091"
network="192.168.1.0/24"
interface="bce1"
interval="1"
rate -i "${interface}" -r "${interval}" -e -n -Ab -a 255 -c "${network}" -d | while read -r line; do