2个版本
0.1.0-alpha.2 | 2022年10月30日 |
---|
#10 in #proof-of-work
30KB
619 代码行
comproxity
简单的工作量证明 (PoW) HTTP 代理
__
_(\ |@@|
(__/\__ \--/ __
\___|----| | __
\ }{ /\ )_ / _\
/\__/\ \__O (__
(--/\--) \__/
_)( )(_
`---''---`
算法
请求尝试
sequenceDiagram
Client ->>+ Comproxity: request
alt Has token
Comproxity ->>+ Server: Request
Server ->>- Comproxity: Response
Comproxity ->> Client: Response
else
Comproxity ->>- Client: Redirect to verification, put nonce and request ID into Cookies
end
验证过程
sequenceDiagram
Client ->>+ Verifier: Initial request
Verifier ->>- Client: Verification UI
Note right of Client: Performs computationally complex task
Client ->>+ Verifier: Answer
alt Correct Answer
Verifier ->> Client: Redirect by request ID with signed token put into Cookies
else
Verifier ->>- Client: Retry verification
end
致谢
本README和默认HTML页面的ASCII艺术取自ASCII Art Archive。
依赖
~12–21MB
~278K SLoC