mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-04-24 14:39:10 -04:00
allow tls connection in http proxy
This commit is contained in:
@@ -16,6 +16,25 @@ type TlsConfig struct {
|
||||
Certs []*CertificateConfig
|
||||
}
|
||||
|
||||
func (this *TlsConfig) GetConfig() *tls.Config {
|
||||
if !this.Enabled {
|
||||
return nil
|
||||
}
|
||||
|
||||
config := &tls.Config{
|
||||
InsecureSkipVerify: false,
|
||||
}
|
||||
|
||||
config.Certificates = make([]tls.Certificate, len(this.Certs))
|
||||
for index, cert := range this.Certs {
|
||||
config.Certificates[index] = cert.Certificate
|
||||
}
|
||||
|
||||
config.BuildNameToCertificate()
|
||||
|
||||
return config
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
OwnHosts []v2net.Address
|
||||
TlsConfig *TlsConfig
|
||||
|
||||
Reference in New Issue
Block a user