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:
parent
66624acda7
commit
56fe7f0819
3 changed files with 14 additions and 9 deletions
|
@ -29,11 +29,12 @@ validate_section() {
|
||||||
'bindport:port' \
|
'bindport:port' \
|
||||||
'mtu:uinteger:1500' \
|
'mtu:uinteger:1500' \
|
||||||
'mtuauto:bool:0' \
|
'mtuauto:bool:0' \
|
||||||
|
'chacha20:bool:0' \
|
||||||
'dev:string'
|
'dev:string'
|
||||||
}
|
}
|
||||||
|
|
||||||
start_instance() {
|
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}" || {
|
validate_section "${1}" || {
|
||||||
_err "validation failed"
|
_err "validation failed"
|
||||||
|
@ -63,6 +64,7 @@ start_instance() {
|
||||||
${dev:+dev "$dev"} \
|
${dev:+dev "$dev"} \
|
||||||
${mtu:+mtu "$mtu"} \
|
${mtu:+mtu "$mtu"} \
|
||||||
${mtuauto:+mtu-auto} \
|
${mtuauto:+mtu-auto} \
|
||||||
|
${chacha20:+chacha20} \
|
||||||
v4only
|
v4only
|
||||||
|
|
||||||
procd_set_param respawn 0 30 0
|
procd_set_param respawn 0 30 0
|
||||||
|
|
|
@ -27,11 +27,12 @@ validate_section() {
|
||||||
'host:host' \
|
'host:host' \
|
||||||
'port:port' \
|
'port:port' \
|
||||||
'dev:string' \
|
'dev:string' \
|
||||||
|
'chacha20:bool:0' \
|
||||||
'proto:string'
|
'proto:string'
|
||||||
}
|
}
|
||||||
|
|
||||||
start_instance() {
|
start_instance() {
|
||||||
local enable key host port dev listener mptcp proto
|
local enable key host port dev listener mptcp proto chacha20
|
||||||
|
|
||||||
validate_section "${1}" || {
|
validate_section "${1}" || {
|
||||||
_err "validation failed"
|
_err "validation failed"
|
||||||
|
@ -57,6 +58,7 @@ start_instance() {
|
||||||
${host:+host "$host"} \
|
${host:+host "$host"} \
|
||||||
${listener:+listener} \
|
${listener:+listener} \
|
||||||
${mptcp:+mptcp} \
|
${mptcp:+mptcp} \
|
||||||
|
${chacha20:+chacha20} \
|
||||||
${dev:+dev "$dev"} \
|
${dev:+dev "$dev"} \
|
||||||
retry count -1 const 5000000 \
|
retry count -1 const 5000000 \
|
||||||
timeout 5000 \
|
timeout 5000 \
|
||||||
|
|
|
@ -26,6 +26,7 @@ local basicParams = {
|
||||||
{ Flag,"mtuauto",0, translate("MTU auto") },
|
{ Flag,"mtuauto",0, translate("MTU auto") },
|
||||||
|
|
||||||
{ Flag,"mptcp",0, translate("MPTCP") }
|
{ Flag,"mptcp",0, translate("MPTCP") }
|
||||||
|
{ Flag,"chacha20",0, translate("Use ChaCha20 stream cipher") }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue