Documentation ¶
Index ¶
- func GetAllSupportSourceFunc() []string
- func NewLogger() *logrus.Logger
- func ParseDomain(domain string) (*tld.URL, error)
- func ProxyHttpClient(addr string) (*http.Client, error)
- func RegisterSourceFunc(name string, fn SourceFunc) (err error)
- func RegisterTargetFunc(name string, fn TargetFunc) (err error)
- func ValidateConfig(config *JobConfig) error
- func ValidateRecord(domain string, addr *net.IP) error
- func ValidateRecords(domains []string, addr *net.IP) error
- type Auth
- type Config
- type Dispatch
- type Job
- type JobConfig
- type SourceConfig
- type SourceFunc
- type TargetConfig
- type TargetFunc
- type WebHook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllSupportSourceFunc ¶
func GetAllSupportSourceFunc() []string
func ParseDomain ¶
func ProxyHttpClient ¶
ProxyHttpClient to create http client with socks5 proxy
func RegisterSourceFunc ¶
func RegisterSourceFunc(name string, fn SourceFunc) (err error)
func RegisterTargetFunc ¶
func RegisterTargetFunc(name string, fn TargetFunc) (err error)
func ValidateRecord ¶
ValidateRecord 批量验证 DNS 域名是否已经是对应的 IP 地址
Types ¶
type Config ¶
type Config struct { LogFile string `yaml:"logfile" mapstructure:"logfile"` Debug bool `yaml:"debug" mapstructure:"debug"` LoadUI bool `yaml:"ui" mapstructure:"ui"` BindAddr string `yaml:"addr" mapstructure:"addr"` Auth Auth `yaml:"auth" mapstructure:"auth"` Jobs []JobConfig `yaml:"ddns" mapstructure:"ddns"` }
type Dispatch ¶
type Dispatch struct { Timeout time.Duration Configs []JobConfig // contains filtered or unexported fields }
func NewDispatch ¶
type Job ¶
type Job struct { Config *JobConfig SourceFunc []SourceFunc TargetFunc TargetFunc // contains filtered or unexported fields }
func (*Job) RunWebhook ¶
RunWebhook to run the webhook when ip address has updated
type JobConfig ¶
type JobConfig struct { WebHook WebHook `yaml:"webhook" mapstructure:"webhook"` Source SourceConfig `yaml:"source,omitempty" mapstructure:"source"` Target TargetConfig `yaml:"target,omitempty" mapstructure:"target"` }
type SourceConfig ¶
type SourceFunc ¶
func SourceFuncByName ¶
func SourceFuncByName(name string) (fn SourceFunc, err error)
type TargetConfig ¶
type TargetFunc ¶
func TargetFuncByName ¶
func TargetFuncByName(name string) (fn TargetFunc, err error)
Click to show internal directories.
Click to hide internal directories.