https://github.com/umutbasal/whoami
request, system, environment info web service
https://github.com/umutbasal/whoami
container cpu debug disk environment network rust sysinfo system
Last synced: 5 months ago
JSON representation
request, system, environment info web service
- Host: GitHub
- URL: https://github.com/umutbasal/whoami
- Owner: umutbasal
- License: mit
- Created: 2023-08-18T19:20:56.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-11-18T16:21:48.000Z (over 1 year ago)
- Last Synced: 2025-04-14T21:12:26.542Z (about 1 year ago)
- Topics: container, cpu, debug, disk, environment, network, rust, sysinfo, system
- Language: Rust
- Homepage:
- Size: 50.8 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# whoami
```sh
docker pull umutbasal/whoami:latest
docker run -p 8080:8080 --rm -it --name wh umutbasal/whoami:latest
```
## Output
- Request Remote Address
- Request Headers
- Environment Variables
- System Information
- CPU
- Disk
- Memory
- Network
- Hostname
- Users
- OS Information
- Boot Time
- ... (see [sysinfo](https://docs.rs/sysinfo/latest/sysinfo/) crate)
- Isolation posture via [am-i-isolated](https://github.com/edera-dev/am-i-isolated)
### Output types
- JSON
- if `Accept: application/json` header is present
- if user agent is `curl`
- if path or query includes "j" (eg /j, /?j)
- HTML
- default behavior when visiting from browser
- if path or query includes "h" (eg /h, /?h)
### Example
```sh
curl http://localhost:8080/ | jq '.sysinfo.host_name'
"ubuntu"
```
```sh
# best way to work with cli
curl http://localhost:8080/ | yq -P | less
environment:
CARGO: /Users/user/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/cargo
CARGO_HOME: /Users/user/.cargo
....
```
```sh
# same html view for cli
curl http://localhost:8080/h | less
environment
+--------------------------------------+-------------------------------------------------------------------------+
| CARGO | /Users/user/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/cargo |
+--------------------------------------+-------------------------------------------------------------------------+
| CARGO_HOME | /Users/user/.cargo |
+--------------------------------------+-------------------------------------------------------------------------+
...
```
