Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions about trojan protocol design (关于trojan协议设计的问题) #661

Open
ttc0419 opened this issue Dec 21, 2022 · 0 comments
Open

Comments

@ttc0419
Copy link

ttc0419 commented Dec 21, 2022

According to trojan official document, the protocol is defined as following:

+-----------------------+---------+----------------+---------+----------+
| hex(SHA224(password)) |  CRLF   | Trojan Request |  CRLF   | Payload  |
+-----------------------+---------+----------------+---------+----------+
|          56           | X'0D0A' |    Variable    | X'0D0A' | Variable |
+-----------------------+---------+----------------+---------+----------+
  1. Why do we convert the binary output of sha224 to hex string?
  2. hex(SHA224(password)) length is fixed, Trojan Request length can also be calculated esaily, why do we need to add CRLF at the end of each section?

根据trojan官方文档,协议定义如下:

+-----------------------+---------+----------------+---------+----------+
| hex(SHA224(password)) |  CRLF   | Trojan Request |  CRLF   | Payload  |
+-----------------------+---------+----------------+---------+----------+
|          56           | X'0D0A' |    Variable    | X'0D0A' | Variable |
+-----------------------+---------+----------------+---------+----------+
  1. 为什么要把sha224的二进制输出转换为文本十六进制?
  2. hex(SHA224(password))为固定长度,Trojan Request也可以轻松计算长度,为什么需要CRLF把不同部分间隔?
@ttc0419 ttc0419 changed the title 关于trojan协议设计的问题 Questions about trojan protocol design (关于trojan协议设计的问题) Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant