TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: IPof – no nonsense client IP address lookup for machines

4 点作者 vivekv超过 10 年前
I would like to present a simple API for obtaining the public IP address of the client. the API is fairly simple.<p>JSON<p>http:&#x2F;&#x2F;ipof.candralabs.com&#x2F;json<p>XML<p>http:&#x2F;&#x2F;ipof.candralabs.com&#x2F;xml<p>Plain text<p>http:&#x2F;&#x2F;ipof.candralabs.com&#x2F;txt<p>Please share your feedback. What features would you like to have in this simple service?

3 条评论

jlgaddis超过 10 年前
Why do you think something like this needs more &quot;features&quot;?<p>When I&#x27;m somewhere other than home and need to know my public IP address for some reason, I just use &quot;icanhazip&quot; [0] (GitHub: [1]) which I&#x27;ve aliased to make it even easier&#x2F;quicker, e.g.:<p><pre><code> $ alias myip alias myip=&#x27;curl http:&#x2F;&#x2F;icanhazip.com&#x27; $ myip 192.0.2.42 </code></pre> It doesn&#x27;t get much simpler than that -- just spit out the IP address in plain-text and, if needed, I&#x27;ll massage it however I need to.<p>[0]: <a href="http://icanhazip.com/" rel="nofollow">http:&#x2F;&#x2F;icanhazip.com&#x2F;</a><p>[1]: <a href="https://github.com/major/icanhaz" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;major&#x2F;icanhaz</a>
评论 #8836218 未加载
vivekv超过 10 年前
I received a bunch of feature requests and here is the status<p>1. smaller URL : Changed it to ipof.in so the new URL is<p><a href="http://ipof.in/json" rel="nofollow">http:&#x2F;&#x2F;ipof.in&#x2F;json</a> <a href="http://ipof.in/xml" rel="nofollow">http:&#x2F;&#x2F;ipof.in&#x2F;xml</a> <a href="http://ipof.in/txt" rel="nofollow">http:&#x2F;&#x2F;ipof.in&#x2F;txt</a><p>2. HTTPS support<p>Done. same URLs as above, except in HTTPS format<p>3. Return the IP in the HTTP response headers<p>Done. Added header X-IPof : &lt;ipaddress&gt;<p>4. check if the IP is blacklisted<p>Done. Returns a blacklisted flag in the XML and JSON response.<p>5. Todo<p>IPv6 Geo location data<p>Hope this helps
detaro超过 10 年前
IPv4&#x2F;6 support is a big one (but not something new, many similar services have that also)