[GH-ISSUE #2565] 明文模式下 token 的運作方式安全性 #2039

Closed
opened 2026-05-05 13:19:01 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @KusakabeShi on GitHub (Sep 5, 2021).
Original GitHub issue: https://github.com/fatedier/frp/issues/2565

Describe the feature request

您好,想請教token是如何在frps和frpc之間傳遞的?

我不擔心數據被竊聽,因為ssh已經有加密了。所以我想讓frp運作在明文模式

但是如果frp運作在明文模式,token是否會以明文傳輸呢?
這讓是否能讓中間人攔截我的token,假冒我的身分以frpc連接我的frps呢?

還是說會有挑戰的過程,伺服器產生一次性challange(或是使用jwt),並計算 md5(challange+token)
把challange明文傳輸給frpc。 frpc也計算 md5(challange+token) ,回傳給frps
token完全沒有被傳輸到

因為文檔沒有提到token如何被處裡的,想來問問

Describe alternatives you've considered

No response

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @KusakabeShi on GitHub (Sep 5, 2021). Original GitHub issue: https://github.com/fatedier/frp/issues/2565 ### Describe the feature request 您好,想請教token是如何在frps和frpc之間傳遞的? 我不擔心數據被竊聽,因為ssh已經有加密了。所以**我想讓frp運作在明文模式** 但是如果frp運作在明文模式,**token是否會以明文傳輸呢?** 這讓是否能讓中間人攔截我的token,假冒我的身分以frpc連接我的frps呢? 還是說會有挑戰的過程,伺服器產生一次性challange(或是使用jwt),並計算 md5(challange+token) 把challange明文傳輸給frpc。 frpc也計算 md5(challange+token) ,回傳給frps token完全沒有被傳輸到 因為文檔沒有提到token如何被處裡的,想來問問 ### Describe alternatives you've considered _No response_ ### Affected area - [X] Docs - [ ] Installation - [ ] Performance and Scalability - [X] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:19:01 -06:00
Author
Owner

@fatedier commented on GitHub (Sep 6, 2021):

你的猜测是正确的,传输的时候会用 token + timestamp 做 hash 运算。

<!-- gh-comment-id:913387225 --> @fatedier commented on GitHub (Sep 6, 2021): 你的猜测是正确的,传输的时候会用 token + timestamp 做 hash 运算。
Author
Owner

@KusakabeShi commented on GitHub (Sep 6, 2021):

所以就算是明文傳輸模式,也不用擔心黑客攔截token,假冒我的frpc,把流量導向黑客的frpc上,對吧?

對了,hash(token + timestamp),可能有重放攻擊,想請教針對這點有做防禦嗎?

<!-- gh-comment-id:913579210 --> @KusakabeShi commented on GitHub (Sep 6, 2021): 所以就算是明文傳輸模式,也不用擔心黑客攔截token,假冒我的frpc,把流量導向黑客的frpc上,對吧? 對了,hash(token + timestamp),可能有重放攻擊,想請教針對這點有做防禦嗎?
Author
Owner

@fatedier commented on GitHub (Sep 7, 2021):

更多的细节建议阅读代码了解。

<!-- gh-comment-id:913949122 --> @fatedier commented on GitHub (Sep 7, 2021): 更多的细节建议阅读代码了解。
Author
Owner

@github-actions[bot] commented on GitHub (Oct 8, 2021):

Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

<!-- gh-comment-id:938248450 --> @github-actions[bot] commented on GitHub (Oct 8, 2021): Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#2039
No description provided.