traefik / whoami

Tiny Go server that prints os information and HTTP request to output

Home Page:https://traefik.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What does each line mean ?

nodecentral opened this issue · comments

Hi,

Please forgive what is probably obvious to most , but what does each line that’s reported mean (exactly)? I’m using the whoami Docker container with others (gluetun) to help me validate that I’ve been given an IP provided by my vpn provider, but looking at what’s reported there is information I don’t recognise, even the host name reported is not familiar, where does that come from. Some of them I can work out, but if by any chance you have a explanation for each one, that would be awesome - thanks !

Hostname: ba38f324df5f2
IP: 127.0.0.1
IP: 104.37.6.103
IP: 10.0.3.2
RemoteAddr: 192.168.102.118:51630
GET / HTTP/1.1
Host: 10.10.10.80:89
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-gb
Connection: keep-alive
Cookie: CS_SESS_ID=1e7234ed-80df-4374-84a0-6b79d504462c; QT=1621932594983; NAS_PW_STATUS=0; NAS_SID=n04fa23sd; NAS_USER=admin; home=1
Referer: http://10.10.10.80:8080/containerstation/?t=16219325903892/
Upgrade-Insecure-Requests: 1

If there scope for a future enhancement , then perhaps consider adding environment variables to allow people to customise the labels, so rather than have 3 called IP, I could describe them differently to know which is which?

Hello,

The hostname you have is basically your container name. You can set it to foo by running this container with --name foo option or to your real hostname by running it onto the host network with --net=host.

The IPs you see are basically the IPs associated with your container/host IPs (if your container runs on the same network namespace). So in order:

  • your loopback
  • your docker host public IP
  • your vtun IP

The RemoteAddr is then machine private IP the request comes from through your tunnel I guess.

The rest of what you see is basically your request with the headers the requester set.

Many thanks,

QQ: sometime i only two IP address reported, how do I know which is which ?

Feature request: Are there any plans to add ‘where am I’ feature, so I can the geographical location of the public IP address I have when running it through a VPN?

commented

You can set it to foo by running this container with --name foo option

I believe the correct key is --hostname.