### Xray-core full configuration with geo-files (JSON) Source: https://context7.com/runetfreedom/russia-v2ray-rules-dat/llms.txt An example of a complete Xray-core configuration that utilizes geoip.dat and geosite.dat for sophisticated traffic routing. It includes rules for ads, specific domains, IPs, and network types. ```json { "routing": { "domainStrategy": "IPOnDemand", "rules": [ { "type": "field", "domain": ["geosite:category-ads-all"], "outboundTag": "block" }, { "type": "field", "domain": [ "geosite:ru-blocked", "geosite:openai", "geosite:meta" ], "outboundTag": "proxy" }, { "type": "field", "ip": ["geoip:ru-blocked"], "outboundTag": "proxy" }, { "type": "field", "domain": ["geosite:win-spy", "geosite:win-extra"], "outboundTag": "block" }, { "type": "field", "network": "tcp,udp", "outboundTag": "direct" } ] } } ``` -------------------------------- ### V2Ray routing configuration with geosite (JSON) Source: https://context7.com/runetfreedom/russia-v2ray-rules-dat/llms.txt Example V2Ray routing configuration using geosite.dat to direct traffic to blocked domains through a proxy. It defines rules based on domain matching for various categories. ```json { "routing": { "domainStrategy": "AsIs", "rules": [ { "type": "field", "domain": [ "geosite:ru-blocked", "geosite:discord", "geosite:youtube", "geosite:twitter" ], "outboundTag": "proxy" }, { "type": "field", "domain": [ "geosite:ru-available-only-inside" ], "outboundTag": "direct" }, { "type": "field", "domain": [ "geosite:category-ads-all" ], "outboundTag": "block" } ] } } ``` -------------------------------- ### V2Ray routing configuration with geoip (JSON) Source: https://context7.com/runetfreedom/russia-v2ray-rules-dat/llms.txt Example V2Ray routing configuration using geoip.dat to direct traffic to blocked IPs through a proxy. It specifies rules based on IP address matching. ```json { "routing": { "domainStrategy": "IPIfNonMatch", "rules": [ { "type": "field", "ip": [ "geoip:ru-blocked", "geoip:ru-blocked-community" ], "outboundTag": "proxy" }, { "type": "field", "ip": [ "geoip:telegram", "geoip:google" ], "outboundTag": "proxy" }, { "type": "field", "ip": ["geoip:private"], "outboundTag": "direct" } ] } } ``` -------------------------------- ### Download geosite.dat and verify checksum (Bash) Source: https://context7.com/runetfreedom/russia-v2ray-rules-dat/llms.txt Downloads the latest geosite.dat file using curl and verifies its integrity using a SHA256 checksum. This file contains lists of domains categorized by their status in Russia, including blocked domains, ads, and telemetry. ```bash # Скачать последнюю версию geosite.dat curl -sSL -o geosite.dat https://raw.githubusercontent.com/runetfreedom/russia-v2ray-rules-dat/release/geosite.dat # Проверить контрольную сумму curl -sSL -o geosite.dat.sha256sum https://raw.githubusercontent.com/runetfreedom/russia-v2ray-rules-dat/release/geosite.dat.sha256sum sha256sum -c geosite.dat.sha256sum ``` -------------------------------- ### Download and extract sing-box SRS files (Bash) Source: https://context7.com/runetfreedom/russia-v2ray-rules-dat/llms.txt Downloads the latest sing-box SRS (Sing-box Rule Set) archive and extracts its contents. These files are converted from geoip.dat and geosite.dat for use with the sing-box client. ```bash # Скачать архив с sing-box rule-set файлами curl -sSL -o sing-box.zip https://github.com/runetfreedom/russia-v2ray-rules-dat/releases/latest/download/sing-box.zip # Распаковать архив unzip sing-box.zip -d sing-box-rules/ # Структура архива: # sing-box-rules/ # ├── rule-set-geoip/ # │ ├── ru-blocked.srs # │ ├── cloudflare.srs # │ └── ... # └── rule-set-geosite/ #  ├── ru-blocked.srs #  ├── google.srs #  └── ... ``` -------------------------------- ### Download geoip.dat and verify checksum (Bash) Source: https://context7.com/runetfreedom/russia-v2ray-rules-dat/llms.txt Downloads the latest geoip.dat file using curl and verifies its integrity using a SHA256 checksum. This file contains IP addresses of blocked resources and popular services. ```bash # Скачать последнюю версию geoip.dat curl -sSL -o geoip.dat https://raw.githubusercontent.com/runetfreedom/russia-v2ray-rules-dat/release/geoip.dat # Проверить контрольную сумму curl -sSL -o geoip.dat.sha256sum https://raw.githubusercontent.com/runetfreedom/russia-v2ray-rules-dat/release/geoip.dat.sha256sum sha256sum -c geoip.dat.sha256sum ``` -------------------------------- ### Automatic Geo-File Update Script (Bash) Source: https://context7.com/runetfreedom/russia-v2ray-rules-dat/llms.txt A bash script to automatically update geoip.dat and geosite.dat files on a server. It downloads the latest files, checks for changes using `cmp`, and reloads the V2Ray service if updates are applied. ```bash #!/bin/bash # update-geodat.sh - Скрипт обновления geo-файлов GEOIP_URL="https://raw.githubusercontent.com/runetfreedom/russia-v2ray-rules-dat/release/geoip.dat" GEOSITE_URL="https://raw.githubusercontent.com/runetfreedom/russia-v2ray-rules-dat/release/geosite.dat" DEST_DIR="/usr/local/share/v2ray" mkdir -p "$DEST_DIR" # Скачать новые файлы во временную директорию curl -sSL -o /tmp/geoip.dat "$GEOIP_URL" curl -sSL -o /tmp/geosite.dat "$GEOSITE_URL" # Проверить и обновить geoip.dat if ! cmp -s /tmp/geoip.dat "$DEST_DIR/geoip.dat"; then mv /tmp/geoip.dat "$DEST_DIR/geoip.dat" echo "geoip.dat обновлён" fi # Проверить и обновить geosite.dat if ! cmp -s /tmp/geosite.dat "$DEST_DIR/geosite.dat"; then mv /tmp/geosite.dat "$DEST_DIR/geosite.dat" echo "geosite.dat обновлён" fi # Перезапустить v2ray если файлы обновились systemctl reload v2ray 2>/dev/null || true ``` -------------------------------- ### GeoSite Categories for Domain Routing Source: https://context7.com/runetfreedom/russia-v2ray-rules-dat/llms.txt Lists available domain categories in geosite.dat for configuring routing rules. These categories allow for granular control over traffic based on domain names. ```text # Заблокированные домены в России geosite:ru-blocked # antifilter-download-community + re:filter geosite:ru-blocked-all # ВСЕ известные заблокированные домены (700K+) geosite:antifilter-download # Все домены antifilter.download (700K+) geosite:antifilter-download-community # community.antifilter.download geosite:refilter # Домены из re:filter # Специальные категории geosite:ru-available-only-inside # Доступны только внутри России geosite:category-ads-all # Рекламные домены # Windows телеметрия geosite:win-spy # Слежка и аналитика Windows geosite:win-update # Обновления Windows geosite:win-extra # Прочие домены Windows # Популярные сервисы (из domain-list-community) geosite:google geosite:youtube geosite:discord geosite:twitter geosite:meta geosite:openai # ... и многие другие ``` -------------------------------- ### GeoIP Categories for Traffic Routing Source: https://context7.com/runetfreedom/russia-v2ray-rules-dat/llms.txt Defines categories for IP addresses used in geoip.dat for traffic routing rules. These categories help in directing traffic to specific destinations based on IP address location or blocking status. ```text # Заблокированные IP-адреса в России geoip:ru-blocked # ipresolve.lst + subnet.lst из antifilter.download geoip:ru-blocked-community # community.lst из community.antifilter.download geoip:re-filter # ipsum.lst из re:filter # Популярные сервисы (на основе ASN) geoip:cloudflare geoip:cloudfront geoip:facebook geoip:fastly geoip:google geoip:netflix geoip:telegram geoip:twitter geoip:ddos-guard geoip:yandex ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.