feat: use embed geoip database (#396)

* feat: use embed geoip database

* mention ipinfo

* only read once

* comments

comments

* chore: installer version

---------

Co-authored-by: naiba <hi@nai.ba>
This commit is contained in:
UUBulb
2024-07-28 13:59:58 +08:00
committed by GitHub
parent 9d96c58ff9
commit 26d81f6d7a
14 changed files with 261 additions and 48 deletions

View File

@@ -9,6 +9,7 @@ service NezhaService {
rpc ReportTask(TaskResult)returns(Receipt){}
rpc RequestTask(Host)returns(stream Task){}
rpc IOStream(stream IOStreamData)returns(stream IOStreamData){}
rpc LookupGeoIP(GeoIP)returns(GeoIP){}
}
message Host {
@@ -22,7 +23,7 @@ message Host {
string virtualization = 8;
uint64 boot_time = 9;
string ip = 10;
string country_code = 11;
string country_code = 11; // deprecated
string version = 12;
repeated string gpu = 13;
}
@@ -73,3 +74,8 @@ message Receipt{
message IOStreamData {
bytes data = 1;
}
message GeoIP {
string ip = 1;
string country_code = 2;
}