davidaparicio/namecheck
GitHub: davidaparicio/namecheck
Namecheck 是一个用 Go 编写的 CLI 和服务器,用于一次性检查用户名在 GitHub、GitLab、Reddit、Bluesky 等多个平台上的可用性。
Stars: 1 | Forks: 5
# Namecheck
` 返回 404 |
| GitLab | 公开的 REST API `https://gitlab.com/api/v4/users?username=` 在用户名可用时返回 `[]` |
| Reddit | 当用户名可用时,`https://www.reddit.com/user//about.json` 返回 404 |
| Bluesky | 公开的 AT Protocol API `com.atproto.identity.resolveHandle` 在 handle `.bsky.social` 可用时返回 400 |
| Mastodon | 公开的 REST API `https://mastodon.social/api/v1/accounts/lookup?acct=` 在(`mastodon.social` 实例上的)用户名可用时返回 404 |
| Hacker News | 官方的 Firebase API `https://hacker-news.firebaseio.com/v0/user/.json` 在用户名可用时返回 `null` |
| Tinder | 抓取个人资料页面(`https://tinder.com/@`) |
| Twitter | 通过 GCP Cloud Function 模拟(详见下文说明) |
| Instagram | 抓取个人资料页面(默认禁用) |
来源:https://gitdiagram.com/davidaparicio/namecheck
## 如何使用
如果你的笔记本电脑上已经安装了 ```Docker```
```docker run davidaparicio/namecheck: ```
如果未安装,你需要 ```Go``` 以及所有依赖项
```go run cmd/cli/main.go ```
或者通过以下命令运行服务器
```go run cmd/server/main.go```
并使用 curl 命令进行检查 ```curl http://localhost:8080/check?username=```
了解更多信息,你可以查看[这里的示例](EXAMPLES.md)
## 备注
Twitter 检查器使用了 GCP Cloud Function,添加了网络延迟模拟功能,可通过参数进行配置。
服务器处理超时的方式采纳了 [Filippo Valsorda](https://github.com/FiloSottile) 在 Cloudflare 博客上的建议([文章 1 ](https://blog.cloudflare.com/the-complete-guide-to-golang-net-http-timeouts/)/[ 文章 2](https://blog.cloudflare.com/exposing-go-on-the-internet/))以及 [Ilija Eftimov](https://ieftimov.com/posts/make-resilient-golang-net-http-servers-using-timeouts-deadlines-context-cancellation/) 的建议。
关于使用 `gorilla/mux` 的 [ADR](https://github.blog/2020-08-13-why-write-adrs/)(架构决策记录)可以在[这里](https://www.alexedwards.net/blog/which-go-router-should-i-use)找到。
## 代码覆盖率

## 原始项目
Fork 自 [@jub0bs](https://github.com/jub0bs/) 的开源项目,可在 GitHub 上查看 [https://github.com/jub0bs/namecheck](https://github.com/jub0bs/namecheck)。
## 许可证
基于 MIT 许可证第 2.0 版(“许可证”)授权。除非遵守该许可证,否则你不得使用此文件。
你可以从[这里](https://choosealicense.com/licenses/mit/)获取许可证副本。
如果需要帮助,这里有 [FOSSA 的“许可证 101”](https://fossa.com/blog/open-source-licenses-101-mit-license/)、关于 MIT 许可证的 [Snyk 说明](https://snyk.io/learn/what-is-mit-license/)
,以及 [Jean-Michael Legait](https://twitter.com/jmlegait) 关于许可证的[法语会议演讲](https://www.youtube.com/watch?v=8WwTe0vLhgc)。
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fdavidaparicio%2Fnamecheck?ref=badge_large)
来源:https://gitdiagram.com/davidaparicio/namecheck
## 如何使用
如果你的笔记本电脑上已经安装了 ```Docker```
```docker run davidaparicio/namecheck:标签:EVTX分析, Golang, Web服务, 安全编程, 日志审计, 用户名查询, 社交媒体, 请求拦截