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:
parent
4a825c5650
commit
9ceaa526a5
23 changed files with 125 additions and 1071 deletions
|
@ -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'
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue