TeaWeb/web/app/dns.ts

13 lines
552 B
TypeScript
Raw Normal View History

import {AddressTarget, ResolveOptions} from "tc-shared/dns";
2020-09-16 19:50:21 +00:00
import {ServerAddress} from "tc-shared/tree/Server";
2021-01-10 17:32:17 +00:00
import {resolveAddressIpV4, resolveTeaSpeakServerAddress} from "./dns/resolver";
2020-03-30 11:44:18 +00:00
export function supported() { return true; }
export async function resolve_address(address: ServerAddress, options?: ResolveOptions) : Promise<AddressTarget> {
return await resolveTeaSpeakServerAddress(address, options);
}
export async function resolve_address_ipv4(address: string) : Promise<string> {
2021-01-10 17:32:17 +00:00
return await resolveAddressIpV4(address);
2020-03-30 11:44:18 +00:00
}