Skip to content

junian/checkip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CheckIP

Check Public IP Address.

Usage

Open web browser.

From terminal, you can use curl.

$ curl -L checkip.junian.dev
203.0.113.113

Integrate with code, example in C#:

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.

npm install

Run in local machine.

npm run dev

Deploy to Cloudflare Worker.

npm run deploy

About

Check Public IP Address

Topics

Resources

License

Stars

Watchers

Forks

Contributors