routedns
routedns copied to clipboard
Feature Request: support upstream routing using geosite.dat
https://github.com/v2fly/domain-list-community
I'm not very familiar with it. Can you describe how you think it should work? Like a dedicated router, or adding it as a blocklist? Automatic updates?
It works like:
- The
geosite.datfile path can be specified from configuration, likegeodata_path: /path/to/geosite.dat - The file will be loaded into RAM at runtime, and the protobuf encoded binary data will be decoded and prepared for matching.
- So we can reference it in the routing rules like
geosite:private -> upstream1, which means the query that contained ingeosite:privatewill be route to upstream1
Automatic updates will be better, but not the most important feature, update between restart is also acceptable.
I looked at the file, trying to understand how to interpret the data in it. In your example, what is geosite:private? For example, one entry in dlc.dat looks like this:
{
"countryCode": "YOUTUBE",
"domain": [
{
"type": "RootDomain",
"value": "youtube"
},
{
"type": "RootDomain",
"value": "ggpht.cn",
"attribute": [
{
"key": "cn",
"boolValue": true
}
]
},
{
"type": "RootDomain",
"value": "ggpht.com"
},
{
"type": "RootDomain",
"value": "googlevideo.com"
},
Do you expect to route on the value of countryCode? Or when there's an attribute present?