[GH-ISSUE #3123] Add support for .dat routing rules #1447

Open
opened 2026-10-13 20:42:39 +00:00 by bsakaguchi · 3 comments
Owner

Originally created by @vahidx4r4x on GitHub (Sep 3, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/3123

hi
please add .dat format support for routing rules
im using WG and its awesome
but the problem is i cant add every site one by one
at least add a CIDR and wildcard *.ir support

Originally created by @vahidx4r4x on GitHub (Sep 3, 2026). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/3123 hi please add .dat format support for routing rules im using WG and its awesome but the problem is i cant add every site one by one at least add a CIDR and wildcard ``*.ir`` support
Author
Owner

@0443n commented on GitHub (Sep 5, 2026):

Worth noting: the geodata is already shipped, it just isn't wired up. Since site-based split tunneling expands to plain routes and is protocol-agnostic, geoip fits that existing path directly as a CIDR source and would work for AWG, OpenVPN and Xray alike. Geosite does not, since domains there are one-shot resolved to IPv4 at connect time, so tens of thousands of domains would need either xray routing rules (VLESS only) or DNS-based matching. @vkamn I can do the geoip part, which is the smaller half and covers most of what people ask for in #796/#856/#1039. Main open question is list size, since geoip for a single country is ~15k CIDRs and large lists already cause #3020/#2976/#2985. Would you take that PR?

<!-- gh-comment-id:5549812165 --> @0443n commented on GitHub (Sep 5, 2026): Worth noting: the geodata is already shipped, it just isn't wired up. Since site-based split tunneling expands to plain routes and is protocol-agnostic, geoip fits that existing path directly as a CIDR source and would work for AWG, OpenVPN and Xray alike. Geosite does not, since domains there are one-shot resolved to IPv4 at connect time, so tens of thousands of domains would need either xray routing rules (VLESS only) or DNS-based matching. @vkamn I can do the geoip part, which is the smaller half and covers most of what people ask for in #796/#856/#1039. Main open question is list size, since geoip for a single country is ~15k CIDRs and large lists already cause #3020/#2976/#2985. Would you take that PR?
Author
Owner

@vahidx4r4x commented on GitHub (Sep 5, 2026):

Worth noting: the geodata is already shipped, it just isn't wired up. Since site-based split tunneling expands to plain routes and is protocol-agnostic, geoip fits that existing path directly as a CIDR source and would work for AWG, OpenVPN and Xray alike. Geosite does not, since domains there are one-shot resolved to IPv4 at connect time, so tens of thousands of domains would need either xray routing rules (VLESS only) or DNS-based matching. @vkamn I can do the geoip part, which is the smaller half and covers most of what people ask for in #796/#856/#1039. Main open question is list size, since geoip for a single country is ~15k CIDRs and large lists already cause #3020/#2976/#2985. Would you take that PR?

Wow.
You got so technical 😅
So basically you are saying it is not possible?
I gave GPT AWG .json route rule file and iran domains addresses and asked it to fit all of the domains in AWG .json format
Then i gave it to AWG. It took some time and finally all the domains got imported. But AWG did not resolv addresses to IPs.
So it was a failed experiment.

<!-- gh-comment-id:5552218406 --> @vahidx4r4x commented on GitHub (Sep 5, 2026): > Worth noting: the geodata is already shipped, it just isn't wired up. Since site-based split tunneling expands to plain routes and is protocol-agnostic, geoip fits that existing path directly as a CIDR source and would work for AWG, OpenVPN and Xray alike. Geosite does not, since domains there are one-shot resolved to IPv4 at connect time, so tens of thousands of domains would need either xray routing rules (VLESS only) or DNS-based matching. [@vkamn](https://github.com/vkamn) I can do the geoip part, which is the smaller half and covers most of what people ask for in [#796](https://github.com/amnezia-vpn/amnezia-client/issues/796)/[#856](https://github.com/amnezia-vpn/amnezia-client/issues/856)/[#1039](https://github.com/amnezia-vpn/amnezia-client/issues/1039). Main open question is list size, since geoip for a single country is ~15k CIDRs and large lists already cause [#3020](https://github.com/amnezia-vpn/amnezia-client/issues/3020)/[#2976](https://github.com/amnezia-vpn/amnezia-client/issues/2976)/[#2985](https://github.com/amnezia-vpn/amnezia-client/issues/2985). Would you take that PR? Wow. You got so technical 😅 So basically you are saying it is not possible? I gave GPT AWG .json route rule file and ``iran domains addresses`` and asked it to fit all of the domains in AWG .json format Then i gave it to AWG. It took some time and finally all the domains got imported. But AWG did not resolv addresses to IPs. So it was a failed experiment.
Author
Owner

@mikop63 commented on GitHub (Sep 14, 2026):

It would be great to add support for .dat routing rule files.

Apps like Happ already support remotely updated .dat databases. This is very convenient because users do not need to manually maintain large lists of domains, CIDRs, or wildcard rules. When new domains or IP ranges are added upstream, the client can automatically receive updated routing rules.

Example for Russia:
https://github.com/hydraponique/roscomvpn-routing

It would also be useful to define routing rules directly in a VPN configuration or subscription, so users receive a ready-to-use setup.

Ideally:

  • support .dat routing files;
  • support remote .dat URLs with automatic updates;
  • support CIDR and wildcard rules like *.ir;
  • allow routing rules to be included in the VPN config/subscription;
  • allow users to disable these predefined routing rules locally.

This would make WireGuard routing much easier to manage, especially for large and frequently changing rule sets.

<!-- gh-comment-id:5669353943 --> @mikop63 commented on GitHub (Sep 14, 2026): It would be great to add support for `.dat` routing rule files. Apps like Happ already support remotely updated `.dat` databases. This is very convenient because users do not need to manually maintain large lists of domains, CIDRs, or wildcard rules. When new domains or IP ranges are added upstream, the client can automatically receive updated routing rules. Example for Russia: https://github.com/hydraponique/roscomvpn-routing It would also be useful to define routing rules directly in a VPN configuration or subscription, so users receive a ready-to-use setup. Ideally: * support `.dat` routing files; * support remote `.dat` URLs with automatic updates; * support CIDR and wildcard rules like `*.ir`; * allow routing rules to be included in the VPN config/subscription; * allow users to disable these predefined routing rules locally. This would make WireGuard routing much easier to manage, especially for large and frequently changing rule sets.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amnezia-client#1447
No description provided.