English | Русский
Download the ready-to-use RU direct IP list
A Node.js CLI that generates an ip-list.json file for AmneziaVPN split tunneling.
The default ru-direct profile combines Russian IPv4 networks from MaxMind GeoLite2 with local networks. IPdeny is used as a fallback. The generated list is intended to route this traffic outside the VPN tunnel.
- Node.js 20.12 or newer;
- npm;
- a free MaxMind account and GeoLite2 license key for the primary GeoIP source;
- access to MaxMind or the fallback
www.ipdeny.comsource when refreshing the cache.
Install the dependencies:
npm installCreate a local npm link to make amnezia-split available as a command:
npm linkYou can now run:
amnezia-split list
amnezia-split build ru-directWithout npm link, invoke the CLI through Node.js:
node ./src/cli.js list
node ./src/cli.js build ru-directRun these commands from the project root unless you provide an explicit configuration path.
amnezia-split listUse a different configuration file:
amnezia-split list --config ./configs/custom.yamlamnezia-split build ru-directThe default output path is:
dist/ru-direct.ip-list.json
The file contains IPv4 networks in the AmneziaVPN import format:
[
{ "hostname": "2.56.24.0/22", "ip": "" },
{ "hostname": "10.0.0.0/8", "ip": "" }
]A plain JSON array of strings cannot be imported: AmneziaVPN expects every entry to contain the hostname and ip fields.
Disconnect from the VPN and run amnezia-split build ru-direct, then import the generated file:
-
On the AmneziaVPN home screen, click Split tunneling disabled.
-
Open Site-based split tunneling.
-
Select Addresses from the list should not be accessed via VPN. Russian and local networks from the generated list will then bypass the VPN.
-
Open the additional actions menu and click Import.
-
Select Replace site list to replace the current address list.
-
Open the project
distdirectory and selectru-direct.ip-list.json. -
Verify that the addresses appear in the list, enable Split tunneling, return to the home screen, and connect to the VPN.
Set the output JSON path:
amnezia-split build ru-direct --out dist/ip-list.jsonAlso write a plain-text list with one network per line:
amnezia-split build ru-direct --txt dist/ru-direct.txtGenerate a report showing the source of every network:
amnezia-split build ru-direct --explain dist/ru-direct.explain.txtOptions can be combined:
amnezia-split build ru-direct \
--out dist/ru-direct.ip-list.json \
--txt dist/ru-direct.txt \
--explain dist/ru-direct.explain.txtIgnore the existing cache and download fresh data:
amnezia-split build ru-direct --no-cacheUse a different configuration file:
amnezia-split build custom-profile --config ./configs/custom.yamlShow all available options:
amnezia-split build --helpBy default, the CLI reads amnezia-split.yaml from the current directory:
profiles:
ru-direct:
description: "RU and local/private networks bypass VPN"
mode: bypass-vpn
include:
- geoip:ru
- geoip:private
# Keep this address inside the VPN even if it belongs to geoip:ru.
exclude:
- cidr:203.0.113.10/32
# Domains are resolved to their current IPv4 addresses during the build.
domains:
- gosuslugi.ru
sources:
geoip:
provider: maxmind
fallbackProvider: ipdeny
maxmind:
cacheTtlHours: 168
ipdeny:
aggregated: true
cacheTtlHours: 24
url:
cacheTtlHours: 24
dns:
cacheTtlHours: 1Profile fields:
description— text displayed by thelistcommand;mode— the profile purpose displayed in the console and explain report;include— rules used to build the list;exclude— networks to subtract from the result;domains— domains whose current IPv4 addresses should be added as/32routes.
The mode field does not change the output format. Select whether listed traffic uses or bypasses the VPN in the AmneziaVPN split tunneling settings.
geoip:ru— country IPv4 networks using a two-letter country code, such asgeoip:kzorgeoip:de;geoip:private— LAN, CGNAT, link-local, and multicast IPv4 networks;geoip:special— loopback, documentation, benchmark, and reserved IPv4 networks;cidr:192.0.2.0/24— one explicit network;file:rules/custom.txt— CIDRs from a local text file;url:https://example.org/networks.txt— CIDRs from a remote text file;domain:example.org— the domain's current A records as/32routes.
A local or remote list must contain one CIDR per line. Empty lines and lines beginning with # are ignored:
# Corporate networks
192.0.2.0/24
198.51.100.10/32
Relative file: paths are resolved from the directory containing the YAML configuration file.
Every rule type can be used in both include and exclude. Exclusion also works for an address inside a larger network: for example, the VPN server's /32 route is correctly subtracted from its containing geoip:ru range.
Domains can be listed in a separate profile field:
profiles:
ru-services:
include:
- geoip:private
domains:
- avito.st
- gosuslugi.ru
- esia.gosuslugi.ruThe build performs IPv4 DNS lookups. Resolved addresses are cached and added as /32 routes.
This is not a complete equivalent of V2Ray geosite: AmneziaVPN routes IP addresses and does not evaluate the domain name on every connection. CDN addresses may change or be shared by unrelated sites, so domain rules work best for a small set of important services with regular profile rebuilds.
provider— primary GeoIP provider; defaults tomaxmind;fallbackProvider— provider used when the primary source is unavailable; defaults toipdeny;sources.geoip.maxmind.cacheTtlHours— MaxMind cache lifetime; defaults to 168 hours;sources.geoip.ipdeny.aggregated— use aggregated IPdeny lists; defaults totrue;sources.geoip.ipdeny.cacheTtlHours— IPdeny cache lifetime; defaults to 24 hours;sources.url.cacheTtlHours— remote CIDR-list cache lifetime; defaults to 24 hours;sources.dns.cacheTtlHours— DNS cache lifetime; defaults to 1 hour.
Create a free MaxMind account and license key. Copy the environment template:
cp .env.example .envFill in .env:
MAXMIND_ACCOUNT_ID=your-account-id
MAXMIND_LICENSE_KEY=your-license-keyThe CLI loads .env from the current directory automatically:
amnezia-split build ru-directThe .env file is ignored by Git. Credentials are never written to the cache or output files. When MaxMind cannot be downloaded and no fresh MaxMind cache exists, the build automatically falls back to IPdeny and prints a warning. The same warning is included in the --explain report.
profiles:
kz-direct:
description: "Kazakhstan and local networks bypass VPN"
mode: bypass-vpn
include:
- geoip:kz
- geoip:privateBuild it with:
amnezia-split build kz-directDownloaded lists are stored in .cache/maxmind, .cache/ipdeny, and .cache/url; DNS results are stored in .cache/dns. A build does not require network access while its cached data remains fresh.
The --no-cache option disables cache reads. Successfully downloaded and validated data is still written for future builds.
Run the automated tests:
npm testBuild the default profile through npm:
npm run build:ru





