1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-18 10:26:01 -05:00
v2fly/proxy/http/config.go

26 lines
387 B
Go
Raw Normal View History

2015-12-14 11:26:29 -05:00
package http
2016-01-26 05:28:09 -05:00
import (
v2net "github.com/v2ray/v2ray-core/common/net"
)
2016-04-25 09:30:28 -04:00
type TlsConfig struct {
Enabled bool
CertFile string
KeyFile string
}
type Config struct {
2016-04-25 09:30:28 -04:00
OwnHosts []v2net.Address
TlsConfig *TlsConfig
2016-01-26 05:28:09 -05:00
}
func (this *Config) IsOwnHost(host v2net.Address) bool {
for _, ownHost := range this.OwnHosts {
if ownHost.Equals(host) {
return true
}
}
return false
2015-12-14 11:26:29 -05:00
}