通过ip获取归属地

import requests
def get_ip():
   response = requests.get('https://api64.ipify.org?format=json').json()
   return response["ip"]
def get_location():
   ip_address = get_ip()
   response = requests.get(f'https://ipapi.co/{ip_address}/json/').json()
   location_data = {
   "ip": ip_address,
   "city": response.get("city"),
   "region": response.get("region"),
   "country": response.get("country_name")
   }
   return location_data
print(get_location())

chatgpt

  • AI: Hello human, I am a GPT powered AI chat bot. Ask me anything!

AI Thinking ...

orangepi_r1_openwrt 固件并升级内核

https://archive.openwrt.org/releases/22.03.4/targets/sunxi/cortexa8/packages/

opkg update
opkg install luci-i18n-base-zh-cn
wget http://www.mixdiy.com/wp-content/uploads/2023/05/kernel_5.10.176-1-e45ce9e19f75a9fbea47c1ca2190d2a3_arm_cortex-a8_vfpv3.ipk
opkg install kernel_5.10.176-1-e45ce9e19f75a9fbea47c1ca2190d2a3_arm_cortex-a8_vfpv3.ipk

另一个版本:

https://archive.openwrt.org/releases/22.03.4/targets/sunxi/cortexa7/packages/

回到soft界面,安装所有v2ray