website/docs/segments/web/ipify.mdx
Ipify is a simple Public IP Address API, it returns your public IP Address in plain text.
import Config from "@site/src/components/Config.js";
<Config data={{ type: "ipify", style: "diamond", foreground: "#ffffff", background: "#c386f1", leading_diamond: "\ue0b6", trailing_diamond: "\uE0B0", template: "{{ .IP }}", options: { http_timeout: 1000, }, }} />
| Name | Type | Default | Description |
|---|---|---|---|
url | string | https://api.ipify.org | The Ipify URL, by default IPv4 is used, use https://api64.ipify.org for IPv6 |
http_timeout | int | 20 | in milliseconds - how long may the segment wait for a response of the ipify API |
cache_duration | string | 24h | the duration for which the IP will be cached. The duration is a string in the format 1h2m3s and is parsed using the time.ParseDuration function from the Go standard library. To disable the cache, use none |
:::note default template
{{ .IP }}
:::
| Name | Type | Description |
|---|---|---|
.IP | string | Your external IP address |