config.go 288 B

123456789101112131415161718
  1. package http
  2. import (
  3. v2net "github.com/v2ray/v2ray-core/common/net"
  4. )
  5. type Config struct {
  6. OwnHosts []v2net.Address
  7. }
  8. func (this *Config) IsOwnHost(host v2net.Address) bool {
  9. for _, ownHost := range this.OwnHosts {
  10. if ownHost.Equals(host) {
  11. return true
  12. }
  13. }
  14. return false
  15. }