Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Indexable

[key: string]: any

Index

Constructors

constructor

Properties

addedNameservers

addedNameservers: string[] = []

appName

appName: string = ""

dataPath

dataPath: string = ""

networkInterface

networkInterface: string = ""

savedNameservers

savedNameservers: string[] = []

savedResolvFileLines

savedResolvFileLines: string[] = []

savedResolvSymlink

savedResolvSymlink: string = ""

Methods

dataFileExists

  • dataFileExists(): Promise<boolean>

deleteDataFile

  • deleteDataFile(): Promise<void>

exists

  • exists(nameserver: string): Promise<undefined | string>
  • Check if name server exists

    Parameters

    • nameserver: string

      Name of the nameserver to find if exists

    Returns Promise<undefined | string>

getDns

  • getDns(networkInterface: string): Promise<string[]>
  • Fetches list of DNS addresses

    Parameters

    • networkInterface: string

      Network interface to read

    Returns Promise<string[]>

getNetworkInterface

  • getNetworkInterface(): Promise<string>

load

  • load(dnsList: string[]): Promise<void>
  • Sets current network interface's DNS

    Parameters

    • dnsList: string[]

      List of new DNS addresses to apply

    Returns Promise<void>

loadDataFromFile

  • loadDataFromFile(): Promise<void>

recover

  • recover(): Promise<void>

save

  • save(): Promise<void>
  • Saves current user's list of DNs addresses

    Returns Promise<void>

saveDataToFile

  • saveDataToFile(): Promise<void>

setDns

  • setDns(networkInterface: string, dnsList: string[]): Promise<object>
  • Updates the list of DNS addresses for a particular network interface

    Parameters

    • networkInterface: string

      Network interface to update

    • dnsList: string[]

      List of DNS addresses to set

    Returns Promise<object>

updateNetworkInterface

  • updateNetworkInterface(): Promise<void>
  • Fetches the current network interface and updates class object

    Returns Promise<void>

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc