V2RayScrapeByCountry: A Country-Sorted V2Ray Config Scraper With a Narrow Match
کافیگ V2Ray جدید به ازای کشور
At a glance
- What is it?
- This Python project scrapes V2Ray configs from public sources and sorts them by country, but its strict name-matching rule leaves the country files empty. It is a small, single-purpose tool for users who need protocol-level config lists.
- Who is it for?
- Adopt V2RayScrapeByCountry if you need a quick, protocol-sorted dump of V2Ray configs (ShadowSocks, Vless, Trojan, Vmess) from public sources and can tolerate that country-specific files may be empty due to strict name matching. Do not use it if you rely on country-level filtering, as the current matching logic (based on config name or internal name) produced zero country files in the latest run.
- Can I use it commercially?
- Not without permission. GitHub finds no licence file in the repository, and without a licence all rights are reserved by default: you may read the code but not reuse it. Check the README, or ask the authors, before using it.
- Is it still maintained?
- Yes. The repository last received commits 1 day ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 21, 2026, and from our analysis. They are not legal advice.
Star history
- miladtahanian/V2RayScrapeByCountry52 ★ · +4
| Repository | 2026-08-21 | 2026-10-21 |
|---|---|---|
| miladtahanian/V2RayScrapeByCountry | 48 | 52 |
4 Stars in the last 61 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
What the Project Actually Does
The tool is for people who want a pre-sorted list of V2Ray configs by protocol, and who may also want to filter by country. It is not a full proxy manager or a validator. The output is plain text files, one per protocol, which you can feed into a V2Ray client that supports bulk import. The project does not claim to test whether the configs are alive, and there is no mention of speed or uptime checks in the README.
The Matching Mechanism and Why Country Files Are Empty
The removal of heavily URL-encoded configs is another filter that can reduce the pool. Many real-world V2Ray configs are URL-encoded to some degree, especially Vmess links, which may explain why Vmess has only 2 entries. This is a trade-off: the scraper avoids messy strings but may discard valid configs. The documentation does not specify how many configs were removed or what the exact criteria for 'long' or 'special keywords' are.
Getting It Running: What the README Shows
The output files are plain text, one config per line presumably. The protocol counts give a sense of the scale: ShadowSocks and Vless dominate, while Vmess and Trojan are sparse. If you only need protocol lists, you can use the raw links without running anything. That is the simplest path: fetch the text files and import them into your client. For country-specific lists, you would need to either modify the matching logic or accept that the files are empty.
Limitations and Failure Modes
The most obvious failure mode is the empty country files. If the project's primary promise is country-based configs, it currently fails to deliver that. The strict name-matching rule is brittle: it depends on config authors including country names in the '#' label, which is not a standard practice. Many public V2Ray configs use server IPs or random strings as names, so the scraper will skip them. The removal of URL-encoded configs is another limitation. Vmess links are typically long and URL-encoded, which explains the tiny count of 2. This means the Vmess output is nearly useless for practical purposes. The tool also does not validate configs, so you may import dead or broken links. The README does not mention any error handling for network failures or rate limits, so a long scrape could fail midway without warning. Finally, the project has no license information, which complicates any reuse or redistribution of the scraped data.
A Real Alternative: Country Detection by IP Geolocation
A different approach is to scrape configs without name-based filtering and then determine the country by resolving the server domain or IP and querying a geolocation database like MaxMind GeoLite2. That method does not rely on config names at all, so it catches configs that have no country label. It also handles URL-encoded configs better, because you parse the config structure first and extract the server address, then geolocate that address. The trade-off is that you need to add a geolocation dependency and handle IP resolution for domain-based servers, which can be slow or blocked. Projects like v2ray-rules-dat or similar config aggregators often use this approach. The difference is fundamental: name matching is zero-cost but unreliable, while IP geolocation is more accurate but requires additional processing. For a country-sorted list, the latter is the more robust choice, though it is not what this project does.
Maintenance and License Implications
The README shows a timestamp of 2026-08-29, which suggests the output is refreshed on some schedule, but there is no information about how often the scraper runs or whether it is automated via CI. The repository has no recent releases and no indication of active development. The license is listed as unknown, which is a red flag for anyone wanting to use the code or the generated lists in a project with legal requirements. Without a license, you technically have no permission to use, modify, or distribute the code beyond what GitHub's Terms of Service allow for viewing. The output configs are scraped from public sources, but the scraped data may have its own terms of service. This is not legal advice, but it is a practical concern: if you plan to redistribute the output files, you should verify the source terms. The maintenance cost is low if you just use the raw files, but if you fork the script, you will need to update the scraping logic as sources change. The project is small, so the upgrade cost is minimal, but the lack of documentation means you will spend time reading code.
Editorial conclusion
Adopt V2RayScrapeByCountry if you need a quick, protocol-sorted dump of V2Ray configs (ShadowSocks, Vless, Trojan, Vmess) from public sources and can tolerate that country-specific files may be empty due to strict name matching. Do not use it if you rely on country-level filtering, as the current matching logic (based on config name or internal name) produced zero country files in the latest run. Before relying on it, verify the freshness of the generated output_configs files, since the README shows a timestamp of 2026-08-29, and check whether the scraper's source code has any rate-limiting or error handling that matches your use case. The project has no license information and no release history, so treat it as a reference tool, not a maintained dependency.
Frequently asked questions
What is V2Ray used for in this repository?
The repository itself does not explain V2Ray. What it publishes is configuration files grouped by country: 91 rows, 10061 configurations in total, each row linking to a raw text file under the Countries directory that a client can consume as a subscription.
Is there a free V2Ray server available from v2rayscrapebycountry?
The repository publishes scraped configuration text files rather than servers of its own, 10061 of them across 91 countries, each with a Subscribe link to a raw file. Nothing in the repository states that a listed configuration has been tested or is still reachable.
Is there a free V2Ray version available for Iran?
The table has an Iran row with 115 configurations and a Subscribe link pointing at a raw file named Iran.txt in the Countries directory. The row is counted, not verified, so the number says how many lines the file held at the last run.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/miladtahanian-v2rayscrapebycountry)Star history chart for your README
[](https://hysenlabs.com/projects/miladtahanian-v2rayscrapebycountry)