<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://jackxiang.com/post//</link>
<title><![CDATA[[实践OK]python 获取服务器IP的脚本]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[Unix/LinuxC技术]]></category>
<pubDate>Tue, 22 Oct 2019 03:27:18 +0000</pubDate> 
<guid>http://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	原理：应该是默认路由出口IP，它也就是能上网的default路由，发起公网请求的clientIP也就是要获取的服务器IP地址。<br/><br/><textarea name="code" class="php" rows="15" cols="100">
&nbsp;&nbsp;&nbsp;&nbsp;echo $(python -c &quot;
import socket;s=socket.socket(socket.AF_INET,socket.SOCK_DGRAM);s.connect((&#039;i.api.weibo.com&#039;,0));print(s.getsockname()[0])
&quot;)
</textarea><br/><br/>10.71.10.40<br/><br/><br/>more:<br/>echo $(python -c &quot;<br/>import socket;s=socket.socket(socket.AF_INET,socket.SOCK_DGRAM);s.connect((&#039;i.api.weibo.com&#039;,0));print(s.getsockname())&nbsp;&nbsp; <br/>&quot;)<br/>(&#039;10.71.10.40&#039;, 45847)<br/><br/><br/>换成别的IP也一样能行：<br/><textarea name="code" class="php" rows="15" cols="100">
echo $(python -c &quot;
import socket;s=socket.socket(socket.AF_INET,socket.SOCK_DGRAM);s.connect((&#039;jackxiang.com&#039;,0));print(s.getsockname()[0])&nbsp;&nbsp;
&quot;)
10.71.10.40
</textarea>
]]>
</description>
</item><item>
<link>http://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] [实践OK]python 获取服务器IP的脚本]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>