|
@ -19,8 +19,6 @@ proto_openfortivpn_init_config() { |
|
|
proto_config_add_string "password" |
|
|
proto_config_add_string "password" |
|
|
proto_config_add_string "trusted_cert" |
|
|
proto_config_add_string "trusted_cert" |
|
|
proto_config_add_string "remote_status_check" |
|
|
proto_config_add_string "remote_status_check" |
|
|
proto_config_add_int "set_dns" |
|
|
|
|
|
proto_config_add_int "pppd_use_peerdns" |
|
|
|
|
|
proto_config_add_int "peerdns" |
|
|
proto_config_add_int "peerdns" |
|
|
proto_config_add_int "metric" |
|
|
proto_config_add_int "metric" |
|
|
no_device=1 |
|
|
no_device=1 |
|
@ -32,7 +30,7 @@ proto_openfortivpn_setup() { |
|
|
local msg |
|
|
local msg |
|
|
|
|
|
|
|
|
json_get_vars host server port iface_name local_ip username password trusted_cert \ |
|
|
json_get_vars host server port iface_name local_ip username password trusted_cert \ |
|
|
remote_status_check set_dns pppd_use_peerdns metric |
|
|
|
|
|
|
|
|
remote_status_check peerdns metric |
|
|
|
|
|
|
|
|
ifname="vpn-$config" |
|
|
ifname="vpn-$config" |
|
|
|
|
|
|
|
@ -91,11 +89,12 @@ proto_openfortivpn_setup() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[ -n "$port" ] && port=":$port" |
|
|
[ -n "$port" ] && port=":$port" |
|
|
|
|
|
[ -z "$peerdns" ] && peerdns=1 |
|
|
|
|
|
|
|
|
append_args "$server$port" --pppd-ifname="$ifname" --use-syslog -c /dev/null |
|
|
append_args "$server$port" --pppd-ifname="$ifname" --use-syslog -c /dev/null |
|
|
append_args "--set-dns=$set_dns" |
|
|
|
|
|
|
|
|
append_args "--set-dns=0" |
|
|
append_args "--no-routes" |
|
|
append_args "--no-routes" |
|
|
append_args "--pppd-use-peerdns=$pppd_use_peerdns" |
|
|
|
|
|
|
|
|
append_args "--pppd-use-peerdns=$peerdns" |
|
|
|
|
|
|
|
|
[ -n "$iface_name" ] && { |
|
|
[ -n "$iface_name" ] && { |
|
|
append_args "--ifname=$iface_device_name" |
|
|
append_args "--ifname=$iface_device_name" |
|
|