does anyone know if and where there is a complete list of TLDs, country code
TLDs and second level domains for those CCTLDs that always have a 2nd
level, like co.uk, edu.au etc. available?
I need it to strip all levels from an FQDN up to the highest level that is
not an official domain name.
e.g. if a host is named foo.bar.com I need my library to know that bar.com
is the highest "customer" domain, while for mypc.lan it's only lan. (yeah,
this should probably be mypc.lan.invalid, but real life isn't like that :-)
and for somehost.somedept.somecorp.com.tw somecorp.com.tw is the highest
Ideally that list would also include entries like somedom.de.vu, but that's
not too important.
PS: for those who care it's about a WPAD implementation that has to locate
an automatic proxy config script using a well-known name based on the
client's host name. Like if my host is called mypc.aa.a.example.co.uk the
implementation first tries to lookup and A or CNAME record for wpad.aa.a
example.co.uk, then wpad.a.example.co.uk, then wpad.example.co.uk but not
wpad.co.uk, wpad.uk or wpad.