Skip to content

Condition

FelisCatus edited this page Jun 14, 2012 · 2 revisions

Conditions decide the result profiles of Switch profiles.

The extension goes through all the conditions in their order until it founds a match or all conditions fail. The profile of the first matched condition will be selected, or the default profile is selected if no condition matches.

Conditions were called 'patterns' or 'rules' in SwitchySharp.

Host conditions

Matches when the host of the URL matches the wildcard expression. Fails otherwise.

Matches when the host of the URL matches the regex. Fails otherwise.

Matches when the count of .(dots) in the host name is within a fixed range.

URL conditions

Matches when the URL matches the wildcard expression. Fails otherwise.

Matches when the URL matches the regex. Fails otherwise.

Keyword conditions can be used to match HTTP URLs that contain one or more keywords. Especially useful when dancing with the GFW.

DateTime conditions

Matches when the current day of month is within a fixed range.

Matches when the current time (in 24hr) is within a fixed range.

Matches when the current day of week is within a fixed range.

Special conditions

As its name suggested, this condition is always matched.

This condition effectively returns the corresponding result profile, and all the following conditions are ignored.

This condition always fails.

This condition effectively prevents the corresponding result profile from being selected.