@@ -74,9 +74,10 @@ func TestDNSConfigParsing(t *testing.T) {
7474 }],
7575 "hosts": {
7676 "example.com": "127.0.0.1",
77+ "xtls.github.io": ["1.2.3.4", "5.6.7.8"],
7778 "domain:example.com": "google.com",
78- "geosite:test": "10 .0.0.1",
79- "keyword:google": "8.8.8.8",
79+ "geosite:test": ["127 .0.0.1", "127.0.0.2"] ,
80+ "keyword:google": [ "8.8.8.8", "8.8.4.4"] ,
8081 "regexp:.*\\.com": "8.8.4.4"
8182 },
8283 "clientIp": "10.0.0.1",
@@ -127,18 +128,23 @@ func TestDNSConfigParsing(t *testing.T) {
127128 {
128129 Type : dns .DomainMatchingType_Full ,
129130 Domain : "example.com" ,
130- Ip : [][]byte {{10 , 0 , 0 , 1 }},
131+ Ip : [][]byte {{127 , 0 , 0 , 1 }, { 127 , 0 , 0 , 2 }},
131132 },
132133 {
133134 Type : dns .DomainMatchingType_Keyword ,
134135 Domain : "google" ,
135- Ip : [][]byte {{8 , 8 , 8 , 8 }},
136+ Ip : [][]byte {{8 , 8 , 8 , 8 }, { 8 , 8 , 4 , 4 } },
136137 },
137138 {
138139 Type : dns .DomainMatchingType_Regex ,
139140 Domain : ".*\\ .com" ,
140141 Ip : [][]byte {{8 , 8 , 4 , 4 }},
141142 },
143+ {
144+ Type : dns .DomainMatchingType_Full ,
145+ Domain : "xtls.github.io" ,
146+ Ip : [][]byte {{1 , 2 , 3 , 4 }, {5 , 6 , 7 , 8 }},
147+ },
142148 },
143149 ClientIp : []byte {10 , 0 , 0 , 1 },
144150 QueryStrategy : dns .QueryStrategy_USE_IP4 ,
0 commit comments