mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 09:18:34 +00:00
Add cipherSuites setting for TLS & XTLS (#78)
This commit is contained in:
parent
19ce0e99a5
commit
88dfed931b
7 changed files with 212 additions and 110 deletions
|
@ -295,6 +295,8 @@ type TLSConfig struct {
|
|||
DisableSessionResumption bool `json:"disableSessionResumption"`
|
||||
DisableSystemRoot bool `json:"disableSystemRoot"`
|
||||
MinVersion string `json:"minVersion"`
|
||||
CipherSuites string `json:"cipherSuites"`
|
||||
PreferServerCipherSuites bool `json:"preferServerCipherSuites"`
|
||||
}
|
||||
|
||||
// Build implements Buildable.
|
||||
|
@ -318,6 +320,8 @@ func (c *TLSConfig) Build() (proto.Message, error) {
|
|||
if c.ALPN != nil && len(*c.ALPN) > 0 {
|
||||
config.NextProtocol = []string(*c.ALPN)
|
||||
}
|
||||
config.CipherSuites = c.CipherSuites
|
||||
config.PreferServerCipherSuites = c.PreferServerCipherSuites
|
||||
config.DisableSessionResumption = c.DisableSessionResumption
|
||||
config.DisableSystemRoot = c.DisableSystemRoot
|
||||
return config, nil
|
||||
|
@ -372,6 +376,8 @@ type XTLSConfig struct {
|
|||
DisableSessionResumption bool `json:"disableSessionResumption"`
|
||||
DisableSystemRoot bool `json:"disableSystemRoot"`
|
||||
MinVersion string `json:"minVersion"`
|
||||
CipherSuites string `json:"cipherSuites"`
|
||||
PreferServerCipherSuites bool `json:"preferServerCipherSuites"`
|
||||
}
|
||||
|
||||
// Build implements Buildable.
|
||||
|
@ -395,6 +401,8 @@ func (c *XTLSConfig) Build() (proto.Message, error) {
|
|||
config.NextProtocol = []string(*c.ALPN)
|
||||
}
|
||||
config.MinVersion = c.MinVersion
|
||||
config.CipherSuites = c.CipherSuites
|
||||
config.PreferServerCipherSuites = c.PreferServerCipherSuites
|
||||
config.DisableSessionResumption = c.DisableSessionResumption
|
||||
config.DisableSystemRoot = c.DisableSystemRoot
|
||||
return config, nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue