Xray-core/common/matcher/domain/domain.proto

39 lines
869 B
Protocol Buffer
Raw Normal View History

2021-03-24 17:01:20 +02:00
syntax = "proto3";
package xray.common.matcher.domain;
option csharp_namespace = "Xray.Common.Matcher.Domain";
option go_package = "github.com/xtls/xray-core/common/matcher/domain";
option java_package = "com.xray.common.matcher.domain";
option java_multiple_files = true;
enum MatchingType {
Full = 0;
Subdomain = 1;
Keyword = 2;
Regex = 3;
}
message Domain {
// Domain matching type.
MatchingType type = 1;
// Domain value.
string value = 2;
}
/*
func toDomainMatchingType(t router.Domain_Type) dns.DomainMatchingType {
switch t {
case router.Domain_Domain:
return dns.DomainMatchingType_Subdomain
case router.Domain_Full:
return dns.DomainMatchingType_Full
case router.Domain_Plain:
return dns.DomainMatchingType_Keyword
case router.Domain_Regex:
return dns.DomainMatchingType_Regex
default:
panic("unknown domain type")
}
}
*/