Comments (8)
确实是更新了,见:https://github.com/v2fly/v2ray-core/blob/master/app/router/routercommon/common.proto
from geoip.
我试了一下,proto 文件写成这样就可以了:
syntax = "proto3";
package v2ray_config;
// Domain for routing decision.
message Domain {
// Type of domain value.
enum Type {
// The value is used as is.
Plain = 0;
// The value is used as a regular expression.
Regex = 1;
// The value is a root domain.
RootDomain = 2;
// The value is a domain.
Full = 3;
}
// Domain matching type.
Type type = 1;
// Domain value.
string value = 2;
message Attribute {
string key = 1;
oneof typed_value {
bool bool_value = 2;
int64 int_value = 3;
}
}
// Attributes of this domain. May be used for filtering.
repeated Attribute attribute = 3;
}
// IP for routing decision, in CIDR form.
message CIDR {
// IP address, should be either 4 or 16 bytes.
bytes ip = 1;
// Number of leading ones in the network mask.
uint32 prefix = 2;
}
message GeoIP {
string country_code = 1;
repeated CIDR cidr = 2;
bool inverse_match = 3;
}
message GeoIPList {
repeated GeoIP entry = 1;
}
message GeoSite {
string country_code = 1;
repeated Domain domain = 2;
}
message GeoSiteList {
repeated GeoSite entry = 1;
}
from geoip.
什么意思?把 geoip.dat
文件下载下来,放到 v2ray 目录下,在配置文件中添加诸如 geoip:cn
的规则就可以使用啊。
from geoip.
我写了一个解析dat的项目,我copy的v2ray-core的proto文件:https://github.com/hezhaozhao-git/kitty_proxy/tree/main/src/protoes
但是解析不了大佬你提供的这个dat文件,用v2ray-core提供的dat文件就可以
from geoip.
没事了,我用xray-core的proto文件可以解析,但是v2ray-core的不行,多谢了,也就是现在的dat文件跟v2ray-core项目不兼容
from geoip.
是的,我用了xray-core的proto文件可以解析大佬提供的dat 文件
from geoip.
本项目也写了解析代码啊,不是这样吗?
Lines 165 to 204 in 09fed9b
from geoip.
本项目也写了解析代码啊,不是这样吗?
Lines 165 to 204 in 09fed9b
是这样的,但是我没看到你的proto文件,,,你应该是copy protoc生成后的go代码吧,我是用proto生成rust代码
from geoip.
Related Issues (20)
- geoip:bigo HOT 1
- 为什么自己添加 IP 源后生成会被自动修改或删除很多 IP 段? HOT 10
- 应从现有国家分类中剔除全球任播IP段 HOT 2
- Netflix的GEOSITE比GEOIP要完整吗 HOT 1
- 请问可以考虑支持db-ip的数据库吗? HOT 6
- 请求添加 GCORE AS199524 AS202422 HOT 1
- Please support sing-box srs format officially required in singbox 1.8.0+. HOT 2
- 部分IP同时存在于HK和CN中,但合并后只在HK中 HOT 1
- 请求更改geoip:private的名称 HOT 1
- 202402290055 HK好多都显示CN HOT 2
- 能单独生成一个!cn的ip集吗?应该怎么做? HOT 2
- 单独的IPv6 geoip文件 HOT 1
- 能考虑增加geoip:tor吗?这个也算非常有意义的吧 HOT 1
- geoip:cn 会导致一些*.TW域名直连 HOT 1
- whatsapp HOT 1
- Required: GEOIP: Tencent HOT 1
- dat格式可以在ngx_http_geoip_module模块使用吗? HOT 4
- GEOIP能否按洲归类 HOT 1
- 请问nginx能用吗 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geoip.