Skip to content
/ wiam Public

A small app is written in golang to echo the HTTP client's IP.

License

Notifications You must be signed in to change notification settings

locnh/wiam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Loc Nguyen
Aug 19, 2021
b240767 · Aug 19, 2021

History

16 Commits
Jul 26, 2021
Jul 26, 2021
Jul 26, 2021
Jul 26, 2021
Aug 19, 2021
Jul 26, 2021
Jul 25, 2021
Jul 26, 2021
Jul 25, 2021
Aug 18, 2021

Repository files navigation

Who / Where I am?

A small app written in golang to echo HTTP client's IP.

Live here: wiam.cc

These are the Docker Hub autobuild images located here.

License Build Status Docker Image Size (latest semver) Docker Image Version (latest semver) Docker

Fearure

GET /

{
  "city": "Frankfurt am Main",
  "country": "Germany",
  "ip": "37.120.196.54"
}
GET /request?whatever

{
  "host": "wiam.cc",
  "method": "GET",
  "proto": "HTTP/1.0",
  "uri": "/request?whatever"
}
GET /header

{
  "Accept": [
    "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"
  ],
  "Accept-Encoding": [
    "gzip, deflate, br"
  ],
  "Accept-Language": [
    "en-GB,en;q=0.9,en-US;q=0.8,vi;q=0.7,de;q=0.6"
  ],
  
  ...

  "User-Agent": [
    "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36 Edg/92.0.902.55"
  ],
  "Via": [
    "2.0 d91961fd00a0c4f7aae668984dcb62a8.cloudfront.net (CloudFront)"
  ],
  "X-Amz-Cf-Id": [
    "ipaVdETgdefi9vQAvH31Wy2ObjyctilDNMBpm9VtdaJISURf3CZPTg=="
  ],
  "X-Forwarded-For": [
    "37.120.196.54"
  ]
}

Usage

Run a Docker container

Default production mode

docker run -p 8080:8080 -d locnh/wiam

or GIN debug

docker run -p 8080:8080 -e GIN_MODE=debug -d locnh/wiam

Contribute

  1. Fork me
  2. Make changes
  3. Create pull request
  4. Grab a cup of tee and enjoy

About

A small app is written in golang to echo the HTTP client's IP.

Resources

License

Stars

Watchers

Forks

Packages

No packages published