mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-17 16:34:04 -08:00
f891a26fe9
resolves #5171
55 lines
1.5 KiB
Plaintext
55 lines
1.5 KiB
Plaintext
---
|
|
id: ipify
|
|
title: Ipify
|
|
sidebar_label: Ipify
|
|
---
|
|
|
|
## What
|
|
|
|
[Ipify][ipify] is a simple Public IP Address API, it returns your public IP Address in plain text.
|
|
|
|
## Sample Configuration
|
|
|
|
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": {
|
|
"cache_timeout": 5,
|
|
"http_timeout": 1000
|
|
}
|
|
}}/>
|
|
|
|
## Properties
|
|
|
|
| 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_timeout` | `int` | `10` | in minutes - How long you want your IP address cached |
|
|
|
|
## Template ([info][templates])
|
|
|
|
:::note default template
|
|
|
|
```template
|
|
{{ .IP }}
|
|
```
|
|
|
|
:::
|
|
|
|
### Properties
|
|
|
|
| Name | Type | Description |
|
|
| ---- | -------- | ------------------------ |
|
|
| .IP | `string` | Your external IP address |
|
|
|
|
[templates]: /docs/configuration/templates
|
|
[ipify]: https://www.ipify.org/
|