mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-06 21:25:04 +03:00
feat(tls): cipher suite presets and a uTLS fingerprint warning
Adds PattN's semi-python and real-firefox client cipher lists as presets in the cipher suites picker. A preset replaces the whole list because the order is part of the ClientHello. The inbound TLS form now warns when cipher suites are set under a uTLS fingerprint other than "unsafe": clients ignore them there, while an empty fingerprint is already pinned to unsafe in share links.
This commit is contained in:
@@ -74,6 +74,37 @@ export const TLS_CIPHER_OPTION = Object.freeze({
|
||||
ECDHE_RSA_CHACHA20_POLY1305: 'TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256',
|
||||
});
|
||||
|
||||
// Whole ordered client lists (PattN's presets): the order is part of the ClientHello,
|
||||
// and clients apply them only under the uTLS fingerprint "unsafe".
|
||||
export const TLS_CIPHER_PRESETS = Object.freeze({
|
||||
'semi-python': [
|
||||
'TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384',
|
||||
'TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384',
|
||||
'TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256',
|
||||
'TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256',
|
||||
'TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256',
|
||||
'TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256',
|
||||
'TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA',
|
||||
'TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA',
|
||||
'TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256',
|
||||
'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256',
|
||||
].join(':'),
|
||||
'real-firefox': [
|
||||
'TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256',
|
||||
'TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256',
|
||||
'TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256',
|
||||
'TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256',
|
||||
'TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384',
|
||||
'TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384',
|
||||
'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA',
|
||||
'TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA',
|
||||
'TLS_RSA_WITH_AES_128_GCM_SHA256',
|
||||
'TLS_RSA_WITH_AES_256_GCM_SHA384',
|
||||
'TLS_RSA_WITH_AES_128_CBC_SHA',
|
||||
'TLS_RSA_WITH_AES_256_CBC_SHA',
|
||||
].join(':'),
|
||||
});
|
||||
|
||||
export const USAGE_OPTION = Object.freeze({
|
||||
ENCIPHERMENT: 'encipherment',
|
||||
VERIFY: 'verify',
|
||||
|
||||
Reference in New Issue
Block a user