[GH-ISSUE #3750] [Feature Request] 设置TLS版本 #2982

Closed
opened 2026-05-05 13:55:25 -06:00 by gitea-mirror · 11 comments
Owner

Originally created by @SidneyLann on GitHub (Nov 7, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3750

Describe the feature request

有些程序要求TLS1.2以上,如何设置TLS的版本?

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 @SidneyLann on GitHub (Nov 7, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3750 ### Describe the feature request 有些程序要求TLS1.2以上,如何设置TLS的版本? ### 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
Author
Owner

@DEEPAO commented on GitHub (Nov 16, 2023):

同问

<!-- gh-comment-id:1813593253 --> @DEEPAO commented on GitHub (Nov 16, 2023): 同问
Author
Owner

@github-actions[bot] commented on GitHub (Dec 17, 2023):

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

<!-- gh-comment-id:1858998671 --> @github-actions[bot] commented on GitHub (Dec 17, 2023): Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
Author
Owner

@SidneyLann commented on GitHub (Dec 17, 2023):

image

redis 默认就是1.2 1.3, 1.2以下基本就是裸奔

<!-- gh-comment-id:1859060745 --> @SidneyLann commented on GitHub (Dec 17, 2023): ![image](https://github.com/fatedier/frp/assets/5990314/8e07c3e0-a6bb-4e1c-880e-245ad148c9ba) redis 默认就是1.2 1.3, 1.2以下基本就是裸奔
Author
Owner

@redlert commented on GitHub (Jan 10, 2024):

唉, 都是为了完全加固!
这个我已经改好了, 不过还没试怎么提交代码, 如果你们不嫌麻烦也可以自己改一下.

  1. 相关文件: pkg/transport/tls.go
  2. 相关函数: NewServerTLSConfig
  3. 相关代码:
    func NewServerTLSConfig(certPath, keyPath, caPath string) (*tls.Config, error) {
    base := &tls.Config{}
    base.MinVersion = tls.VersionTLS12
    base.CipherSuites = []uint16{
    tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
    tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
    tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
    tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
    tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
    tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
    tls.TLS_RSA_WITH_AES_128_CBC_SHA,
    tls.TLS_RSA_WITH_AES_256_CBC_SHA,
    }
  4. 改完之后, 执行go build
  5. 运行cmd/frps/frps
  6. 执行sslscan localhost:7000
    就可以看出已经禁用掉了
<!-- gh-comment-id:1884043519 --> @redlert commented on GitHub (Jan 10, 2024): 唉, 都是为了完全加固! 这个我已经改好了, 不过还没试怎么提交代码, 如果你们不嫌麻烦也可以自己改一下. 1. 相关文件: pkg/transport/tls.go 2. 相关函数: NewServerTLSConfig 3. 相关代码: func NewServerTLSConfig(certPath, keyPath, caPath string) (*tls.Config, error) { base := &tls.Config{} base.MinVersion = tls.VersionTLS12 base.CipherSuites = []uint16{ tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, tls.TLS_RSA_WITH_AES_128_CBC_SHA, tls.TLS_RSA_WITH_AES_256_CBC_SHA, } 4. 改完之后, 执行go build 5. 运行cmd/frps/frps 6. 执行sslscan localhost:7000 就可以看出已经禁用掉了
Author
Owner

@SidneyLann commented on GitHub (Jan 10, 2024):

犀利。提PR嘛

<!-- gh-comment-id:1884311403 --> @SidneyLann commented on GitHub (Jan 10, 2024): 犀利。提PR嘛
Author
Owner

@github-actions[bot] commented on GitHub (Feb 1, 2024):

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

<!-- gh-comment-id:1920253336 --> @github-actions[bot] commented on GitHub (Feb 1, 2024): Issues go stale after 21d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
Author
Owner

@SidneyLann commented on GitHub (Feb 4, 2024):

?

<!-- gh-comment-id:1925524409 --> @SidneyLann commented on GitHub (Feb 4, 2024): ?
Author
Owner

@github-actions[bot] commented on GitHub (Feb 26, 2024):

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

<!-- gh-comment-id:1963126682 --> @github-actions[bot] commented on GitHub (Feb 26, 2024): Issues go stale after 21d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
Author
Owner

@SidneyLann commented on GitHub (Feb 27, 2024):

Set default tls to 1.2

<!-- gh-comment-id:1966423810 --> @SidneyLann commented on GitHub (Feb 27, 2024): Set default tls to 1.2
Author
Owner

@github-actions[bot] commented on GitHub (Mar 20, 2024):

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

<!-- gh-comment-id:2008403571 --> @github-actions[bot] commented on GitHub (Mar 20, 2024): Issues go stale after 21d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
Author
Owner

@SidneyLann commented on GitHub (Mar 22, 2024):

.

<!-- gh-comment-id:2016158874 --> @SidneyLann commented on GitHub (Mar 22, 2024): .
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#2982
No description provided.