initial gotify support

This commit is contained in:
yusing
2024-10-22 05:38:09 +08:00
parent a3ab32e9ab
commit bee26f43d4
15 changed files with 415 additions and 38 deletions

View File

@@ -2,22 +2,23 @@ package types
type (
Config struct {
Providers ProxyProviders `json:"providers" yaml:",flow"`
Providers Providers `json:"providers" yaml:",flow"`
AutoCert AutoCertConfig `json:"autocert" yaml:",flow"`
ExplicitOnly bool `json:"explicit_only" yaml:"explicit_only"`
MatchDomains []string `json:"match_domains" yaml:"match_domains"`
TimeoutShutdown int `json:"timeout_shutdown" yaml:"timeout_shutdown"`
RedirectToHTTPS bool `json:"redirect_to_https" yaml:"redirect_to_https"`
}
ProxyProviders struct {
Files []string `json:"include" yaml:"include"` // docker, file
Docker map[string]string `json:"docker" yaml:"docker"`
Providers struct {
Files []string `json:"include" yaml:"include"`
Docker map[string]string `json:"docker" yaml:"docker"`
Notification NotificationConfigMap `json:"notification" yaml:"notification"`
}
)
func DefaultConfig() *Config {
return &Config{
Providers: ProxyProviders{},
Providers: Providers{},
TimeoutShutdown: 3,
RedirectToHTTPS: false,
}

View File

@@ -0,0 +1,5 @@
package types
import "github.com/yusing/go-proxy/internal/notif"
type NotificationConfigMap map[string]notif.ProviderConfig