Skip to content

Commit

Permalink
fix: ISP Domain display incorrectly
Browse files Browse the repository at this point in the history
  • Loading branch information
sjlleo committed Jun 20, 2022
1 parent 0ccdae8 commit 0210c94
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ipgeo/leo.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,19 @@ func receiveParse() {
// json解析 -> data
res := gjson.Parse(data)
// 根据返回的IP信息,发送给对应等待回复的IP通道上
var domain string = res.Get("domain").String()

if res.Get("domain").String() == "" {
domain = res.Get("owner").String()
}

IPPools.pool[gjson.Parse(data).Get("ip").String()] <- IPGeoData{
Asnumber: res.Get("asnumber").String(),
Country: res.Get("country").String(),
Prov: res.Get("prov").String(),
City: res.Get("city").String(),
District: res.Get("district").String(),
Owner: res.Get("owner").String(),
Owner: domain,
Isp: res.Get("isp").String(),
}
}
Expand Down

0 comments on commit 0210c94

Please sign in to comment.