Files
shadowsocks-libev/completions/bash/ss-local
Max Lv 5f264333a0 Remove the stream ciphers
The unauthenticated stream ciphers (aes-*-cfb, aes-*-ctr, camellia-*-cfb,
chacha20, chacha20-ietf, salsa20) are gone from every build, together
with the SS_ENABLE_LEGACY option, the C++ stream codecs, their C test
oracle and the stream-only tests and configurations. A configuration
naming one of them, or RC4/table, now fails at startup with a message
pointing to an AEAD method, and test_cli checks that.

Shell completions list only the supported methods (and now include the
2022 ones), and the docs and the compatibility contract say the stream
ciphers were removed.
2026-10-15 00:34:33 +08:00

34 lines
1.2 KiB
Plaintext

_ss_local()
{
local cur prev opts ciphers
opts='-s -p -l -k -m -a -f -t -c -n -i -b -u -U -v -h --reuse-port --fast-open --acl --mtu --mptcp --no-delay --printable-salt --key --plugin --plugin-opts --help'
ciphers='aes-128-gcm aes-192-gcm aes-256-gcm chacha20-ietf-poly1305 xchacha20-ietf-poly1305 2022-blake3-aes-128-gcm 2022-blake3-aes-256-gcm 2022-blake3-chacha20-poly1305'
cur=${COMP_WORDS[COMP_CWORD]}
prev="${COMP_WORDS[COMP_CWORD-1]}"
case "$prev" in
-f|-c|--acl)
_filedir || COMPREPLY=( $(compgen -o plusdirs -f ${cur}) )
;;
-s|-b)
_known_hosts_real -- "${cur}" || OMPREPLY=( $(compgen -A hostname -- ${cur}) )
;;
-m)
COMPREPLY=( $(compgen -W "$ciphers" -- ${cur}) )
;;
-a)
_allowed_users || COMPREPLY=( $(compgen -u -- ${cur}) )
;;
-p|-l|-k|-t|-n|--mtu|--key|--plugin|--plugin-opts)
;;
-i)
_available_interfaces -a || true
;;
*)
COMPREPLY+=( $(compgen -W "${opts}" -- ${cur}) )
;;
esac
return 0
}
complete -F _ss_local ss-local