2021-12-23 05:58:18 -08:00
|
|
|
---
|
|
|
|
id: ipify
|
|
|
|
title: Ipify
|
|
|
|
sidebar_label: Ipify
|
|
|
|
---
|
|
|
|
|
|
|
|
## What
|
|
|
|
|
2022-05-17 20:45:44 -07:00
|
|
|
[Ipify][ipify] is a simple Public IP Address API, it returns your public IP Address in plain text.
|
2021-12-23 05:58:18 -08:00
|
|
|
|
|
|
|
## Sample Configuration
|
|
|
|
|
2024-09-30 05:10:06 -07:00
|
|
|
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 }}",
|
|
|
|
properties: {
|
|
|
|
http_timeout: 1000,
|
|
|
|
},
|
|
|
|
}}
|
|
|
|
/>
|
2021-12-23 05:58:18 -08:00
|
|
|
|
|
|
|
## Properties
|
|
|
|
|
2024-09-30 05:10:06 -07:00
|
|
|
| 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 |
|
2021-12-23 05:58:18 -08:00
|
|
|
|
2022-02-01 03:10:46 -08:00
|
|
|
## Template ([info][templates])
|
|
|
|
|
|
|
|
:::note default template
|
|
|
|
|
2022-09-16 07:32:48 -07:00
|
|
|
```template
|
2022-02-01 03:10:46 -08:00
|
|
|
{{ .IP }}
|
|
|
|
```
|
|
|
|
|
|
|
|
:::
|
|
|
|
|
|
|
|
### Properties
|
2021-12-23 05:58:18 -08:00
|
|
|
|
2022-09-16 07:32:48 -07:00
|
|
|
| Name | Type | Description |
|
|
|
|
| ---- | -------- | ------------------------ |
|
|
|
|
| .IP | `string` | Your external IP address |
|
2021-12-23 05:58:18 -08:00
|
|
|
|
2022-04-20 09:43:59 -07:00
|
|
|
[templates]: /docs/configuration/templates
|
2021-12-23 05:58:18 -08:00
|
|
|
[ipify]: https://www.ipify.org/
|