// https://github.com/v2fly/v2ray-core/blob/master/app/router/routercommon/common.proto
syntax = "proto3";

message Domain {
  // Type of domain value.
  enum Type {
    // The value is used as is.
    Plain = 0;
    // The value is used as a regular expression.
    Regex = 1;
    // The value is a root domain.
    RootDomain = 2;
    // The value is a domain.
    Full = 3;
  }

  // Domain matching type.
  Type type = 1;

  // Domain value.
  string value = 2;

  message Attribute {
    string key = 1;

    oneof typed_value {
      bool bool_value = 2;
      int64 int_value = 3;
    }
  }

  // Attributes of this domain. May be used for filtering.
  repeated Attribute attribute = 3;
}

// https://github.com/XTLS/Xray-core/blob/main/app/router/config.proto

message GeoSite {
  string country_code = 1;
  repeated Domain domain = 2;
}

message GeoSiteList {
  repeated GeoSite entry = 1;
}