<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>IP监测 on Laning's Blog</title><link>https://blog.laning.org/tags/ip%E7%9B%91%E6%B5%8B/</link><description>Recent content in IP监测 on Laning's Blog</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Thu, 10 Apr 2025 11:21:01 +0800</lastBuildDate><atom:link href="https://blog.laning.org/tags/ip%E7%9B%91%E6%B5%8B/index.xml" rel="self" type="application/rss+xml"/><item><title>TG机器人通知IP地址</title><link>https://blog.laning.org/posts/wp-0442/</link><pubDate>Wed, 09 Apr 2025 18:38:01 +0800</pubDate><guid>https://blog.laning.org/posts/wp-0442/</guid><description>&lt;h2 id="背景"&gt;背景&lt;/h2&gt;
&lt;p&gt;公网IPv4政策的收紧，包括不限于不能使用DDNS服务解析到未备案域名，因此使用TG机器人API服务，定时检测IP地址，若IP变化则自动更新&lt;/p&gt;
&lt;h2 id="项目地址"&gt;项目地址&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://raw.githubusercontent.com/laningya/Raspberry-Pi/refs/heads/master/shell/telegram-ip-bot.sh"&gt;Raspberry-Pi/shell/telegram-ip-bot.sh at master · laningya/Raspberry-Pi · GitHub&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="部署过程"&gt;部署过程&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;获取ChatID&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;API_TOKEN=&amp;#34;YOUR_BOT_TOKEN&amp;#34;
curl -s &amp;#34;https://api.telegram.org/bot$API_TOKEN/getUpdates&amp;#34; | jq &amp;#39;.result[0].message.chat.id&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;脚本填入Bot的API Token，以及自行判断需要设置代理&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;添加crontab定时任务&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>