syntax = "proto3";

package xray.proxy.dns;
option csharp_namespace = "Xray.Proxy.Dns";
option go_package = "github.com/xtls/xray-core/proxy/dns";
option java_package = "com.xray.proxy.dns";
option java_multiple_files = true;

import "common/net/destination.proto";
import "common/geodata/geodat.proto";

enum RuleAction {
  Direct = 0;
  Drop = 1;
  Return = 2;
  Hijack = 3;
}

message DNSRuleConfig {
  RuleAction action = 1;
  repeated int32 q_type = 2;
  repeated xray.common.geodata.DomainRule domain = 3;
  uint32 r_code = 4;
}

message Config {
  uint32 user_level = 1;
  repeated DNSRuleConfig rule = 2;
  xray.common.net.Endpoint rewrite_server = 3;
}
