https://github.com/junian/checkip
Check Public IP Address
https://github.com/junian/checkip
check-ip cloudflare-workers typescript
Last synced: 9 months ago
JSON representation
Check Public IP Address
- Host: GitHub
- URL: https://github.com/junian/checkip
- Owner: junian
- License: mit
- Created: 2025-01-28T19:50:50.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-28T21:24:55.000Z (over 1 year ago)
- Last Synced: 2025-10-04T04:28:36.114Z (9 months ago)
- Topics: check-ip, cloudflare-workers, typescript
- Language: TypeScript
- Homepage: https://checkip.junian.dev
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: docs/README.md
- License: LICENSE
Awesome Lists containing this project
README
# CheckIP
Check Public IP Address.
## Usage
Open web browser.
From terminal, you can use `curl`.
```bash
$ curl -L checkip.junian.dev
203.0.113.113
```
Integrate with code, example in C#:
```csharp
public string GetPublicIPAddress()
{
var uri = "https://checkip.junian.dev/";
var ip = string.Empty;
using (var client = new HttpClient())
{
ip = client?.GetAsync(uri)?.Result?.Content?
.ReadAsStringAsync()?.Result?.Trim();
}
return ip;
}
```
## Development
Install dependencies.
```bash
npm install
```
Run in local machine.
```bash
npm run dev
```
Deploy to Cloudflare Worker.
```bash
npm run deploy
```