Skip to content

Commit 5c3348a

Browse files
authored
change isp api
1 parent 2d76431 commit 5c3348a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ const PORT = process.env.PORT || 3000; // http和ws服务端
2222
let ISP = '';
2323
const GetISP = async () => {
2424
try {
25-
const res = await axios.get('https://speed.cloudflare.com/meta');
25+
const res = await axios.get('https://api.ip.sb/geoip');
2626
const data = res.data;
27-
ISP = `${data.country}-${data.asOrganization}`.replace(/ /g, '_');
27+
ISP = `${data.country_code}-${data.isp}`.replace(/ /g, '_');
2828
} catch (e) {
2929
ISP = 'Unknown';
3030
}

0 commit comments

Comments
 (0)