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

New interface for Glorytun TCP VPN

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-12-03 11:23:34 +01:00
parent 4a825c5650
commit 9ceaa526a5
23 changed files with 125 additions and 1071 deletions

View file

@ -10,4 +10,5 @@ config glorytun 'vpn'
option mtuauto '1'
option localip '10.255.255.2'
option remoteip '10.255.255.1'
option multiqueue '1'
option multiqueue '1'
option label 'Default VPN'

View file

@ -22,17 +22,18 @@ validate_section() {
uci_validate_section glorytun glorytun "${1}" \
'enable:bool:0' \
'mptcp:bool:0' \
'listener:bool:0' \
'mode:string' \
'key:string' \
'host:host' \
'port:port' \
'dev:string' \
'timeout:uinteger:10000' \
'chacha20:bool:0' \
'proto:string'
}
start_instance() {
local enable key host port dev listener mptcp proto chacha20
local enable key host port dev mptcp proto chacha20 mode multiqueue timeout
validate_section "${1}" || {
_err "validation failed"
@ -71,14 +72,14 @@ start_instance() {
${host:+host "$host"} \
${dev:+dev "$dev"}
[ "${listener}" = "1" ] && procd_append_param command listener
[ "${mode}" = "listener" ] && procd_append_param command listener
[ "${mptcp}" = "1" ] && procd_append_param command mptcp
[ "${chacha20}" = "1" ] && procd_append_param command chacha20
[ "${multiqueue}" = "1" ] && procd_append_param command multiqueue
procd_append_param command \
retry count -1 const 500000 \
timeout 10000 \
timeout ${timeout} \
keepalive count 5 idle 20 interval 2 \
buffer-size 32768