{"id":21863086,"url":"https://github.com/shfshanyue/whoami","last_synced_at":"2026-03-07T03:31:02.403Z","repository":{"id":42862409,"uuid":"259616065","full_name":"shfshanyue/whoami","owner":"shfshanyue","description":"Tiny node.js webserver that prints os information and HTTP request to output","archived":false,"fork":false,"pushed_at":"2023-02-03T06:27:41.000Z","size":88,"stargazers_count":4,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-24T13:11:05.777Z","etag":null,"topics":["docker","docker-image","dockerfile","http-server","node","serverless","traefik-v2"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shfshanyue.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-04-28T11:21:41.000Z","updated_at":"2023-03-07T16:39:17.000Z","dependencies_parsed_at":"2025-04-14T19:43:16.111Z","dependency_job_id":"beda1c6e-a46d-481d-83d0-2fc57046f91c","html_url":"https://github.com/shfshanyue/whoami","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shfshanyue/whoami","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shfshanyue%2Fwhoami","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shfshanyue%2Fwhoami/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shfshanyue%2Fwhoami/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shfshanyue%2Fwhoami/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shfshanyue","download_url":"https://codeload.github.com/shfshanyue/whoami/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shfshanyue%2Fwhoami/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30206563,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T03:24:23.086Z","status":"ssl_error","status_checked_at":"2026-03-07T03:23:11.444Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-image","dockerfile","http-server","node","serverless","traefik-v2"],"created_at":"2024-11-28T03:19:57.421Z","updated_at":"2026-03-07T03:31:02.327Z","avatar_url":"https://github.com/shfshanyue.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Whoami\n\n![](https://img.shields.io/docker/pulls/shanyue/whoami)\n\n受 [containous/whoami](https://github.com/containous/whoami) 启发，使用 nodejs 编写并无任何依赖的 whoami 服务。可用以测试 `docker`，`nginx` 及 `k8s` 服务等，另外也支持测试 `serverless`，如腾讯云与阿里云。以下是测试列表\n\n+ \u003chttps://who.shanyue.tech/\u003e: 山月的个人服务器，通过 `traefik` 及 `docker` 部署\n+ \u003chttps://service-gweo1e2s-1257314149.gz.apigw.tencentcs.com/\u003e: 腾讯云函数计算\n+ \u003chttp://ali-fun.shanyue.tech\u003e: 阿里云函数计算 (将会自动下载 whoami 信息)\n\n## Usage\n\n+ `/*`: 返回 whoami 信息，包括服务器的 IP，hostname 信息及 http request headers\n+ `/bench`: 返回 1，可用来做 benchmark\n+ `/[?wait=d]`: 返回 whoami 信息，d 代表毫秒数，代表服务端延迟。在 Node 中使用一个 Promise 来实现\n\n## Example\n\n### Docker\n\n``` bash\n$ docker run -d -p 3333:3000 shanyue/whoami\n\n$ curl http://0.0.0.0:3333\nGET / HTTP/1.1\nHostname: 9cd2ede0d7a6\nRemoteAddr: ::ffff:172.17.0.1:43740\nIP: 127.0.0.1\nIP: 172.17.0.2\nUser-Agent: curl/7.29.0\nHost: localhost:3333\nAccept: */*\n\n```\n\n### Traefik\n\n``` bash\n$ docker-compose up -d\n\n$ curl https://who.shanyue.tech\n```\n### 腾讯云\n\n关于腾讯云行数部署的更详细文章请参考以下两个仓库\n\n+ [Serverless Http Component for Tencent Cloud](https://github.com/shfshanyue/serverless-http)\n+ [中国云厂商 serverless framework 模板及示例 （更快的访问速度](https://github.com/shfshanyue/serverless-template-zh)\n\n``` bash\n$ npm install -g serverless\n\n# 部署到腾讯云\n$ sls\n\n$ curl https://service-gweo1e2s-1257314149.gz.apigw.tencentcs.com/\n```\n\n### 阿里云\n\n``` bash\n$ npm install -g funcraft\n\n# 部署到阿里云\n$ fun deploy\n\n$ curl http://ali-fun.shanyue.tech\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshfshanyue%2Fwhoami","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshfshanyue%2Fwhoami","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshfshanyue%2Fwhoami/lists"}