1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Add chacha20 option for glorytun

This commit is contained in:
Ycarus 2018-02-07 18:04:27 +01:00
parent 66624acda7
commit 56fe7f0819
3 changed files with 14 additions and 9 deletions

View file

@ -20,20 +20,21 @@ _err() {
validate_section() {
uci_validate_section glorytun glorytun "${1}" \
'enable:bool:0' \
'key:string' \
'host:host' \
'port:port' \
'proto:string' \
'bind:string' \
'enable:bool:0' \
'key:string' \
'host:host' \
'port:port' \
'proto:string' \
'bind:string' \
'bindport:port' \
'mtu:uinteger:1500' \
'mtu:uinteger:1500' \
'mtuauto:bool:0' \
'chacha20:bool:0' \
'dev:string'
}
start_instance() {
local enable key host port dev listener proto bind bindport mtu mtuauto
local enable key host port dev listener proto bind bindport mtu mtuauto chacha20
validate_section "${1}" || {
_err "validation failed"
@ -63,6 +64,7 @@ start_instance() {
${dev:+dev "$dev"} \
${mtu:+mtu "$mtu"} \
${mtuauto:+mtu-auto} \
${chacha20:+chacha20} \
v4only
procd_set_param respawn 0 30 0

View file

@ -27,11 +27,12 @@ validate_section() {
'host:host' \
'port:port' \
'dev:string' \
'chacha20:bool:0' \
'proto:string'
}
start_instance() {
local enable key host port dev listener mptcp proto
local enable key host port dev listener mptcp proto chacha20
validate_section "${1}" || {
_err "validation failed"
@ -57,6 +58,7 @@ start_instance() {
${host:+host "$host"} \
${listener:+listener} \
${mptcp:+mptcp} \
${chacha20:+chacha20} \
${dev:+dev "$dev"} \
retry count -1 const 5000000 \
timeout 5000 \

View file

@ -26,6 +26,7 @@ local basicParams = {
{ Flag,"mtuauto",0, translate("MTU auto") },
{ Flag,"mptcp",0, translate("MPTCP") }
{ Flag,"chacha20",0, translate("Use ChaCha20 stream cipher") }
}