"fmt"
"log"
"math/rand/v2"
+ "net"
+ "net/url"
"os"
"sort"
"strings"
}
func runURLSort() {
+ ipv6 := flag.Bool("6", false, "Only IPv6-capable hostnames")
flag.Usage = func() {
fmt.Fprintf(flag.CommandLine.Output(),
"Usage: %s [options] [cc ...] <urls.txt\n", os.Args[0])
if u.Priority == 999999 {
u.Priority = 0
}
+ if *ipv6 {
+ parsed, err := url.Parse(u.URL)
+ if err != nil {
+ continue
+ }
+ _, err = net.ResolveIPAddr("ip6", parsed.Hostname())
+ if err != nil {
+ continue
+ }
+ }
fmt.Println(u)
}
}
)
const (
- Generator = "meta4ra/1.0.0"
+ Generator = "meta4ra/1.1.0"
SigMediaTypePGP = "application/pgp-signature"
SigMediaTypeSSH = "application/ssh-signature"
BufLen = 1 << 20