1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-06-17 16:29:55 -04:00

own hosts in http config

This commit is contained in:
Darien Raymond
2016-01-26 10:28:09 +00:00
parent befd24c83e
commit 6b894c719d
3 changed files with 73 additions and 1 deletions

View File

@@ -1,4 +1,18 @@
package http
import (
v2net "github.com/v2ray/v2ray-core/common/net"
)
type Config struct {
OwnHosts []v2net.Address
}
func (this *Config) IsOwnHost(host v2net.Address) bool {
for _, ownHost := range this.OwnHosts {
if ownHost.Equals(host) {
return true
}
}
return false
}