v2fly /geoip
GeoIP for V2Ray. Generate and release GeoIP files such as geoip.dat and geoip-only-cn-private.dat for V2Ray automatically monthly.
★ 992⑂ 146👁 24⑃ 134● 17▤ 355
More from this author
+0
Daily
992
stars
146
forks
24
watchers
134
prs
17
issues
355
releases
README
GeoIP for V2Ray
This project releases GeoIP files monthly for routing purpose in Project V. It also provides a command line interface(CLI) tool for users to customize their own GeoIP files.
Download links
For all GeoIP files released by this project, see the release branch. Below are download URLs for some GeoIP files:
- geoip.dat:
- https://github.com/v2fly/geoip/releases/latest/download/geoip.dat
- https://cdn.jsdelivr.net/gh/v2fly/geoip@release/geoip.dat
- geoip.dat.sha256sum:
- https://github.com/v2fly/geoip/releases/latest/download/geoip.dat.sha256sum
- https://cdn.jsdelivr.net/gh/v2fly/geoip@release/geoip.dat.sha256sum
- geoip-only-cn-private.dat:
- https://github.com/v2fly/geoip/releases/latest/download/geoip-only-cn-private.dat
- https://cdn.jsdelivr.net/gh/v2fly/geoip@release/geoip-only-cn-private.dat
- geoip-only-cn-private.dat.sha256sum:
- https://github.com/v2fly/geoip/releases/latest/download/geoip-only-cn-private.dat.sha256sum
- https://cdn.jsdelivr.net/gh/v2fly/geoip@release/geoip-only-cn-private.dat.sha256sum
- cn.dat:
- https://github.com/v2fly/geoip/releases/latest/download/cn.dat
- https://cdn.jsdelivr.net/gh/v2fly/geoip@release/cn.dat
- cn.dat.sha256sum:
- https://github.com/v2fly/geoip/releases/latest/download/cn.dat.sha256sum
- https://cdn.jsdelivr.net/gh/v2fly/geoip@release/cn.dat.sha256sum
- private.dat:
- https://github.com/v2fly/geoip/releases/latest/download/private.dat
- https://cdn.jsdelivr.net/gh/v2fly/geoip@release/private.dat
- private.dat.sha256sum:
- https://github.com/v2fly/geoip/releases/latest/download/private.dat.sha256sum
- https://cdn.jsdelivr.net/gh/v2fly/geoip@release/private.dat.sha256sum
GeoIP usage example in V2Ray
json
"routing": {
"rules": [
{
"type": "field",
"outboundTag": "Direct",
"ip": [
"223.5.5.5/32",
"119.29.29.29/32",
"180.76.76.76/32",
"114.114.114.114/32",
"geoip:cn",
"geoip:private",
"ext:cn.dat:cn",
"ext:private.dat:private",
"ext:geoip-only-cn-private.dat:cn",
"ext:geoip-only-cn-private.dat:private"
]
},
{
"type": "field",
"outboundTag": "Proxy-1",
"ip": [
"1.1.1.1/32",
"1.0.0.1/32",
"8.8.8.8/32",
"8.8.4.4/32"
]
},
{
"type": "field",
"outboundTag": "Proxy-2",
"ip": [
"geoip:us",
"geoip:ca"
]
},
{
"type": "field",
"outboundTag": "Proxy-3",
"ip": [
"geoip:hk",
"geoip:mo",
"geoip:tw",
"geoip:jp",
"geoip:sg"
]
}
]
}
Customize GeoIP files
Concept explanation
These two concepts are notable: input and output. The input is the data source and its input format, whereas the output is the destination of the converted data and its output format. What the CLI does is to aggregate all input format data, then convert them to output format and write them to GeoIP