mirror of
https://github.com/v2rayA/v2rayA.git
synced 2024-11-25 16:34:19 +08:00
Added support to protocol: 2022-blake3-aes-128-gcm and 2 more. Fixed bug while using xray-core.
This commit is contained in:
parent
30f1783120
commit
660b59d8b1
@ -34,8 +34,13 @@
|
||||
<b-field v-if="v2ray.protocol === 'vmess'" label="Security" label-position="on-border">
|
||||
<b-select v-model="v2ray.scy" expanded required>
|
||||
<option value="auto">Auto</option>
|
||||
<option value="2022-blake3-aes-128-gcm">2022-blake3-aes-128-gcm</option>
|
||||
<option value="2022-blake3-aes-256-gcm">2022-blake3-aes-256-gcm</option>
|
||||
<option value="2022-blake3-chacha20-poly1305">2022-blake3-chacha20-poly1305</option>
|
||||
<option value="aes-256-gcm">aes-256-gcm</option>
|
||||
<option value="aes-128-gcm">aes-128-gcm</option>
|
||||
<option value="chacha20-poly1305">chacha20-poly1305</option>
|
||||
<option value="xchacha20-poly1305">xchacha20-poly1305</option>
|
||||
<option value="none">none</option>
|
||||
<option value="zero">zero</option>
|
||||
</b-select>
|
||||
@ -183,6 +188,9 @@
|
||||
</b-field>
|
||||
<b-field label="Method" label-position="on-border">
|
||||
<b-select ref="ss_method" v-model="ss.method" expanded required>
|
||||
<option value="2022-blake3-aes-128-gcm">2022-blake3-aes-128-gcm</option>
|
||||
<option value="2022-blake3-aes-256-gcm">2022-blake3-aes-256-gcm</option>
|
||||
<option value="2022-blake3-chacha20-poly1305">2022-blake3-chacha20-poly1305</option>
|
||||
<option value="aes-128-gcm">aes-128-gcm</option>
|
||||
<option value="aes-256-gcm">aes-256-gcm</option>
|
||||
<option value="chacha20-poly1305">chacha20-poly1305</option>
|
||||
@ -628,7 +636,7 @@ export default {
|
||||
key: "none",
|
||||
},
|
||||
ss: {
|
||||
method: "aes-128-gcm",
|
||||
method: "2022-blake3-aes-128-gcm",
|
||||
plugin: "",
|
||||
obfs: "http",
|
||||
tls: "",
|
||||
@ -955,7 +963,7 @@ export default {
|
||||
method: "origin",
|
||||
net: u.params.type || "tcp",
|
||||
obfs: "none",
|
||||
ssCipher: "aes-128-gcm",
|
||||
ssCipher: "2022-blake3-aes-128-gcm",
|
||||
path: u.params.path || u.params.serviceName || "",
|
||||
protocol: "trojan",
|
||||
};
|
||||
|
@ -327,7 +327,7 @@ func (s *Shadowsocks) ConfigurationMT(info PriorInfo) (c Configuration, err erro
|
||||
|
||||
func (s *Shadowsocks) Configuration(info PriorInfo) (c Configuration, err error) {
|
||||
switch s.Cipher {
|
||||
case "aes-256-gcm", "aes-128-gcm", "chacha20-poly1305", "chacha20-ietf-poly1305", "plain", "none":
|
||||
case "2022-blake3-aes-128-gcm", "2022-blake3-aes-256-gcm", "2022-blake3-chacha20-poly1305", "aes-256-gcm", "aes-128-gcm", "chacha20-poly1305", "chacha20-ietf-poly1305", "xchacha20-poly1305", "xchacha20-ietf-poly1305", "plain", "none":
|
||||
default:
|
||||
return c, fmt.Errorf("unsupported shadowsocks encryption method: %v", s.Cipher)
|
||||
}
|
||||
@ -380,6 +380,9 @@ func (s *Shadowsocks) ProtoToShow() string {
|
||||
if ciph == "chacha20-ietf-poly1305" || ciph == "chacha20-poly1305" {
|
||||
ciph = "c20p1305"
|
||||
}
|
||||
if ciph == "xchacha20-ietf-poly1305" || ciph == "xchacha20-poly1305" {
|
||||
ciph = "xc20p1305"
|
||||
}
|
||||
if s.Plugin.Name != "" {
|
||||
return fmt.Sprintf("SS(%v+%v)", ciph, s.Plugin.Name)
|
||||
}
|
||||
|
@ -34,6 +34,9 @@ func NewShadowsocks(s string, d plugin.Dialer) (*Shadowsocks, error) {
|
||||
if method == "chacha20-poly1305" {
|
||||
method = "chacha20-ietf-poly1305"
|
||||
}
|
||||
if method == "xchacha20-poly1305" {
|
||||
method = "xchacha20-ietf-poly1305"
|
||||
}
|
||||
cipher, err := ss.PickCipher(method, nil, pass)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("NewShadowsocks: %w", err)
|
||||
|
Loading…
Reference in New Issue
Block a user