1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-14 19:41:51 +00:00

Decrease glorytun TCP buffer

This commit is contained in:
Ycarus 2018-09-13 20:32:07 +02:00
parent 6bf3f2e84b
commit e15d239ad4

View file

@ -41,12 +41,19 @@ start_instance() {
[ "${enable}" = "1" ] || return 1 [ "${enable}" = "1" ] || return 1
[ "${proto}" = "tcp" ] || return 1 [ "${proto}" = "tcp" ] || return 1
[ -n "${key}" ] || return 1 [ -n "${key}" ] || {
_err "Key empty"
return 1
}
[ "${key}" != "secretkey" ] || return 1 [ "${key}" != "secretkey" ] || return 1
[ -n "${port}" ] || return 1 [ -n "${port}" ] || return 1
[ -n "${dev}" ] || return 1 [ -n "${dev}" ] || return 1
echo "${key}" > /tmp/${PROG_NAME}-${1}.key echo "${key}" > /tmp/${PROG_NAME}-${1}.key
[ -f "/tmp/${PROG_NAME}-${1}.key" ] || {
_err "can't create key file"
return 1
}
key="" key=""
if [ "$(uci -q get network.omrvpn)" != "" ]; then if [ "$(uci -q get network.omrvpn)" != "" ]; then
@ -69,9 +76,9 @@ start_instance() {
procd_append_param command \ procd_append_param command \
retry count -1 const 50000 \ retry count -1 const 50000 \
timeout 40000 \ timeout 4000 \
keepalive count 5 idle 60 interval 2 \ keepalive count 5 idle 30 interval 2 \
buffer-size 65500 buffer-size 1000
procd_set_param respawn 0 30 0 procd_set_param respawn 0 30 0
procd_set_param file /tmp/${PROG_NAME}-${1}.key procd_set_param file /tmp/${PROG_NAME}-${1}.key