mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-15 09:19:21 +02:00
39 lines
869 B
Protocol Buffer
39 lines
869 B
Protocol Buffer
|
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")
|
||
|
}
|
||
|
}
|
||
|
*/
|