waft.actions.warp_actions.connectivity_actions module

class waft.actions.warp_actions.connectivity_actions.ConnectivityActions(warp_client_handler: WarpClientHandler, system_actions: SystemActions)

Bases: Actions

Actions pertaining to the connectivity and status of the client

cloudflare_dns_resolves() bool

Check to see that we can resolve to cloudflare.

Returns:

bool - True if our connection routes through CF.

confirm_tunnel_connected(expected: bool)

Check to see if WARP is routing the connection through the tunnel

confirm_warp_dns_mode(warp_mode: WarpModes)

Confirm that the DNS resolution mode matches the current WARP client mode.

Parameters:

warp_mode – WARP client mode

domain_routes_through_tunnel(domain: str) bool

Check to see if a particular domain routes through the warp tunnel or not. We return true if the domain routes through the warp tunnel.

Parameters:

domain – Domain to check e.g. cloudflare.com

Returns: bool - True if domain routes through tunnel

get_cf_trace() CfTraceResponse

Sends a request to CF trace url and returns a parsed object :returns: CfTraceResponse object

get_trace(domain: str) CfTraceResponse

Get trace info for a particular domain :param domain: Name of the domain e.g. cloudflare.com

Returns: CfTraceResponse object with information parsed into it.

static get_trace_url(domain: str) str

Returns the trace url for a domain.

Parameters:

domain – Name of the domain e.g. cloudflare.com

Returns: Trace url for the domain e.g. https://cloudflare.com/cdn-cgi/trace

get_warp_dns_mode() str

Get the current WARP DNS resolution mode

verify_ip_version_connectivity(ipv4: bool, ipv6: bool)

Verify the node has ipv4 and/or ipv6 connectivity with the internet

Parameters:
  • ipv4 (bool) – True if ipv4 connectivity is expected to be available

  • ipv6 (bool) – True if ipv6 connectivity is expected to be available

Raises:

AssertionError – raised if connectivity check fails

class waft.actions.warp_actions.connectivity_actions.WarpDnsModes(value)

Bases: Enum

WARP DNS modes

CF = 'cf'
DOH = 'doh'
DOT = 'dot'
NONE = ''