Documentation
¶
Index ¶
- Constants
- Variables
- func AddOrUpdateMyRules(mode byte, host string)
- func AddToAutoList(addrType byte, host string)
- func CanAutoTry(s string) bool
- func Clear()
- func FileNotExist(path string) bool
- func How(t byte, host string) (mode byte)
- func Init(create bool)
- func Inited() bool
- func LazySave()
- func NewSite(mode byte, host string) *site
- func NewSiteFromBytes(b []byte) (s *site, err error)
- func QueryRule(host string) byte
- func RemoteFromMyRule(host string)
- func SetRule(host string, mode byte)
- type Domain
- type IP
- type List
- type RuleList
Constants ¶
View Source
const ( RULE_WHITE string = "white" RULE_BLACK string = "black" RULE_REJECT string = "reject" RULE_AUTO string = "auto" PASS_WHITE string = "white" PASS_BLACK string = "black" PASS_PROXY string = "proxy" PASS_DIRECT string = "direct" MODE_DIRECT byte = 0x00 MODE_PROXY byte = 0x01 MODE_REJECT byte = 0x02 MODE_UNKOWN byte = 0x05 SYNTAX_NORMAL byte = 0x00 SYNTAX_FULL byte = 0x01 SYNTAX_REGEXP byte = 0x02 )
Variables ¶
View Source
var Timeout int64 = 30 * 60 * 1000
Functions ¶
func AddOrUpdateMyRules ¶
func AddToAutoList ¶
func CanAutoTry ¶
func FileNotExist ¶
func NewSiteFromBytes ¶
func RemoteFromMyRule ¶
func RemoteFromMyRule(host string)
Types ¶
type RuleList ¶
var PreDomainBlackList, PreDomainWhiteList, PreDomainRejectList, PreIpBlackList, PreIpWhiteList, PreIpRejectList, MyList, AutoTryList *RuleList
func NewDomainList ¶
func NewSiteList ¶
Click to show internal directories.
Click to hide internal directories.