🚚 Merge code from old patcher
This commit is contained in:
parent
5806b96f4f
commit
fab92b078b
4 changed files with 260 additions and 0 deletions
25
src/interfaces/IDnsResult.ts
Normal file
25
src/interfaces/IDnsResult.ts
Normal file
|
@ -0,0 +1,25 @@
|
|||
type NetworkType = 'master' | 'akamai' | 'level3-eu' | 'level3-us' | 'unknown';
|
||||
|
||||
/** One search result in a DNS query response */
|
||||
interface IDnsResult {
|
||||
/** IP address to which cdn-patch.swtor.com resolves to. */
|
||||
address: string;
|
||||
/** Which network / cloud provider this IP address belongs to. */
|
||||
type: NetworkType;
|
||||
/** Time-to-live, given in seconds, of how long the results last, or when we need to update them. */
|
||||
ttl: number;
|
||||
}
|
||||
|
||||
/** An IP address that was returned by resolved the CDN domain. */
|
||||
interface IServerEntry {
|
||||
/** IP address to which cdn-patch.swtor.com resolves to. */
|
||||
ip: string;
|
||||
/** Which network / cloud provider this IP address belongs to. */
|
||||
type: NetworkType;
|
||||
/** When we were last able to resolve to this IP address. */
|
||||
lastSeen: number;
|
||||
/** A measure of how reliable this IP address is, based on how often and how recently it was resolved. */
|
||||
weight: number;
|
||||
}
|
||||
|
||||
export { IDnsResult, IServerEntry };
|
Loading…
Add table
Add a link
Reference in a new issue