add proxy

This commit is contained in:
微凉
2021-09-04 19:52:56 +08:00
parent eefe53ff01
commit b51b4e083d
7 changed files with 107 additions and 7 deletions

View File

@@ -31,13 +31,14 @@ type Config struct {
} `yaml:"preview" json:"preview"`
} `yaml:"info"`
Server struct {
Address string `yaml:"address"`
Port string `yaml:"port"` //端口
Search bool `yaml:"search"` //允许搜索
Download bool `yaml:"download"` //允许下载
Static string `yaml:"static"`
SiteUrl string `yaml:"site_url"` //网站url
Password string `yaml:"password"`
Address string `yaml:"address"`
Port string `yaml:"port"` //端口
Search bool `yaml:"search"` //允许搜索
Download bool `yaml:"download"` //允许下载
Static string `yaml:"static"`
SiteUrl string `yaml:"site_url"` //网站url
Password string `yaml:"password"`
AllowProxy string `yaml:"allow_proxy"` // 允许代理的后缀
} `yaml:"server"`
AliDrive struct {
ApiUrl string `yaml:"api_url"` //阿里云盘api

View File

@@ -17,6 +17,7 @@ var (
DB *gorm.DB
Origins []string // allow origins
AllowProxies []string
)
var Conf = new(Config)