mirror of
				https://github.com/TeaOSLab/EdgeCommon.git
				synced 2025-11-04 21:50:26 +08:00 
			
		
		
		
	实现TLS配置
This commit is contained in:
		@@ -1,7 +1,7 @@
 | 
			
		||||
package serverconfigs
 | 
			
		||||
 | 
			
		||||
// FTP源站配置
 | 
			
		||||
type OriginFTPConfig struct {
 | 
			
		||||
type FTPServerConfig struct {
 | 
			
		||||
	Username string `yaml:"username" json:"username"` // 用户名
 | 
			
		||||
	Password string `yaml:"password" json:"password"` // 密码
 | 
			
		||||
	Dir      string `yaml:"dir" json:"dir"`           // 目录
 | 
			
		||||
							
								
								
									
										6
									
								
								pkg/serverconfigs/ftp_server_ref.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								pkg/serverconfigs/ftp_server_ref.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
package serverconfigs
 | 
			
		||||
 | 
			
		||||
type FTPServerRef struct {
 | 
			
		||||
	IsOn        bool  `yaml:"isOn" json:"isOn"`
 | 
			
		||||
	FTPServerId int64 `yaml:"ftpServerId" json:"ftpServerId"`
 | 
			
		||||
}
 | 
			
		||||
@@ -41,10 +41,12 @@ type OriginConfig struct {
 | 
			
		||||
	// - http|https 返回2xx-3xx认为成功
 | 
			
		||||
	HealthCheck *HealthCheckConfig `yaml:"healthCheck" json:"healthCheck"`
 | 
			
		||||
 | 
			
		||||
	Cert *sslconfigs.SSLCertConfig `yaml:"cert" json:"cert"` // 请求源服务器用的证书
 | 
			
		||||
	CertRef *sslconfigs.SSLCertRef    `yaml:"certRef" json:"certRef"` // 证书的引用
 | 
			
		||||
	Cert    *sslconfigs.SSLCertConfig `yaml:"cert" json:"cert"`       // 请求源服务器用的证书
 | 
			
		||||
 | 
			
		||||
	// ftp
 | 
			
		||||
	FTP *OriginFTPConfig `yaml:"ftp" json:"ftp"`
 | 
			
		||||
	FTPServerRef *FTPServerRef    `yaml:"ftpServerRef" json:"ftpServerRef"`
 | 
			
		||||
	FTPServer    *FTPServerConfig `yaml:"ftpServer" json:"ftpServer"`
 | 
			
		||||
 | 
			
		||||
	connTimeoutDuration time.Duration
 | 
			
		||||
	readTimeoutDuration time.Duration
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user