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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user