[PR #2966] [CLOSED] feat: support aead encryption #4665

Closed
opened 2026-05-05 14:46:25 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fatedier/frp/pull/2966
Author: @mzz2017
Created: 6/3/2022
Status: Closed

Base: devHead: dev


📝 Commits (1)

  • c23114c feat: support aead encryption

📊 Changes

26 files changed (+68 additions, -21 deletions)

View changed files

📝 client/control.go (+2 -2)
📝 client/proxy/proxy.go (+5 -5)
📝 client/visitor.go (+4 -3)
📝 cmd/frpc/sub/http.go (+2 -0)
📝 cmd/frpc/sub/https.go (+2 -0)
📝 cmd/frpc/sub/root.go (+1 -0)
📝 cmd/frpc/sub/stcp.go (+3 -0)
📝 cmd/frpc/sub/sudp.go (+3 -0)
📝 cmd/frpc/sub/tcp.go (+2 -0)
📝 cmd/frpc/sub/tcpmux.go (+2 -0)
📝 cmd/frpc/sub/udp.go (+2 -0)
📝 cmd/frpc/sub/xtcp.go (+3 -0)
📝 go.mod (+2 -0)
📝 go.sum (+0 -2)
📝 pkg/auth/token.go (+1 -0)
📝 pkg/config/client_test.go (+7 -0)
📝 pkg/config/proxy.go (+7 -0)
📝 pkg/config/proxy_test.go (+7 -0)
📝 pkg/config/visitor.go (+2 -0)
📝 pkg/msg/msg.go (+2 -0)

...and 6 more files

📄 Description

As we all know, stream encryption is vulnerable and recognizable. Compared with that, AEAD is more difficult to break and is a mainstream encryption method.

Related PR: https://github.com/fatedier/golib/pull/16

We enables frp to support the AEAD method (currently only aes-gcm).

Notice: we should remove the replace instruction in go.mod before merging. It should be only for our test.

Example configs:

Server side:

[common]
bind_port = 7000
token = my_token
aead = true
log_level = info

Client side:

[common]
server_addr = 127.0.0.1
server_port = 7000
token = my_token
aead = true

[iperf3]
type = tcp
local_ip = 127.0.0.1
local_port = 5201
remote_port = 5202
use_encryption = true
use_aead = true

Then we can use following commands to test:

iperf3 -s -p 5201
go run ./cmd/frps -c /tmp/frps.ini
go run ./cmd/frps -c /tmp/frpc.ini
iperf3 -c localhost -p 5202

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fatedier/frp/pull/2966 **Author:** [@mzz2017](https://github.com/mzz2017) **Created:** 6/3/2022 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `dev` --- ### 📝 Commits (1) - [`c23114c`](https://github.com/fatedier/frp/commit/c23114c81370fc29198bae8d1226b8de0b839e70) feat: support aead encryption ### 📊 Changes **26 files changed** (+68 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `client/control.go` (+2 -2) 📝 `client/proxy/proxy.go` (+5 -5) 📝 `client/visitor.go` (+4 -3) 📝 `cmd/frpc/sub/http.go` (+2 -0) 📝 `cmd/frpc/sub/https.go` (+2 -0) 📝 `cmd/frpc/sub/root.go` (+1 -0) 📝 `cmd/frpc/sub/stcp.go` (+3 -0) 📝 `cmd/frpc/sub/sudp.go` (+3 -0) 📝 `cmd/frpc/sub/tcp.go` (+2 -0) 📝 `cmd/frpc/sub/tcpmux.go` (+2 -0) 📝 `cmd/frpc/sub/udp.go` (+2 -0) 📝 `cmd/frpc/sub/xtcp.go` (+3 -0) 📝 `go.mod` (+2 -0) 📝 `go.sum` (+0 -2) 📝 `pkg/auth/token.go` (+1 -0) 📝 `pkg/config/client_test.go` (+7 -0) 📝 `pkg/config/proxy.go` (+7 -0) 📝 `pkg/config/proxy_test.go` (+7 -0) 📝 `pkg/config/visitor.go` (+2 -0) 📝 `pkg/msg/msg.go` (+2 -0) _...and 6 more files_ </details> ### 📄 Description As we all know, stream encryption is vulnerable and recognizable. Compared with that, AEAD is more difficult to break and is a mainstream encryption method. Related PR: https://github.com/fatedier/golib/pull/16 We enables frp to support the AEAD method (currently only aes-gcm). Notice: we should remove the `replace` instruction in `go.mod` before merging. It should be only for our test. Example configs: Server side: ```ini [common] bind_port = 7000 token = my_token aead = true log_level = info ``` Client side: ```ini [common] server_addr = 127.0.0.1 server_port = 7000 token = my_token aead = true [iperf3] type = tcp local_ip = 127.0.0.1 local_port = 5201 remote_port = 5202 use_encryption = true use_aead = true ``` Then we can use following commands to test: ```bash iperf3 -s -p 5201 go run ./cmd/frps -c /tmp/frps.ini go run ./cmd/frps -c /tmp/frpc.ini iperf3 -c localhost -p 5202 ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 14:46:25 -06:00
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#4665
No description provided.