1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-10-02 08:46:04 -04:00
v2fly/proxy/http/config.go
2016-05-07 10:06:12 +02:00

32 lines
481 B
Go

package http
import (
"crypto/tls"
v2net "github.com/v2ray/v2ray-core/common/net"
)
type CertificateConfig struct {
Domain string
Certificate tls.Certificate
}
type TlsConfig struct {
Enabled bool
Certs []*CertificateConfig
}
type Config struct {
OwnHosts []v2net.Address
TlsConfig *TlsConfig
}
func (this *Config) IsOwnHost(host v2net.Address) bool {
for _, ownHost := range this.OwnHosts {
if ownHost.Equals(host) {
return true
}
}
return false
}