sstp-client: add support for custom port
Add support for connecting to a custom SSTP port. Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
This commit is contained in:
parent
a3179db0c4
commit
0bced11888
2 changed files with 5 additions and 4 deletions
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=sstp-client
|
||||
PKG_VERSION:=1.0.19
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://gitlab.com/sstp-project/sstp-client/-/archive/1.0.19/
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
proto_sstp_init_config() {
|
||||
proto_config_add_string "server"
|
||||
proto_config_add_string "port"
|
||||
proto_config_add_string "username"
|
||||
proto_config_add_string "password"
|
||||
proto_config_add_string "pppd_options"
|
||||
|
@ -28,7 +29,7 @@ proto_sstp_setup() {
|
|||
local iface="$2"
|
||||
local ifname="sstp-$config"
|
||||
|
||||
local ip serv_addr server ipv6 defaultroute peerdns
|
||||
local ip serv_addr server port ipv6 defaultroute peerdns
|
||||
json_get_var server server && {
|
||||
for ip in $(resolveip -t 5 "$server"); do
|
||||
( proto_add_host_dependency "$config" "$ip" )
|
||||
|
@ -42,7 +43,7 @@ proto_sstp_setup() {
|
|||
exit 1
|
||||
}
|
||||
|
||||
json_get_vars username password pppd_options sstp_options log_level ipv6 defaultroute peerdns
|
||||
json_get_vars port username password pppd_options sstp_options log_level ipv6 defaultroute peerdns
|
||||
if [ "$ipv6" = 1 ]; then
|
||||
ipv6=1
|
||||
else
|
||||
|
@ -82,7 +83,7 @@ proto_sstp_setup() {
|
|||
--save-server-route \
|
||||
--ipparam $config \
|
||||
$sstp_options \
|
||||
$server \
|
||||
$server${port:+:$port} \
|
||||
ifname $ifname \
|
||||
require-mschap-v2 \
|
||||
${ipv6:++ipv6} \
|
||||
|
|
Loading…
Reference in a new issue