X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=applications%2Fluci-app-openvpn%2Fluasrc%2Fmodel%2Fcbi%2Fopenvpn-basic.lua;h=aaa1979c412184c1bdabf5d5f115c5eccf544ba3;hp=e75203db605ae6c8fc424e9b0fe8ed0ca68d6fc7;hb=52de960bb538cdd279d882cd7e23494b077d9989;hpb=e19098d0623e96690e65539b36c59965ae1373d5 diff --git a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua index e75203db6..aaa1979c4 100644 --- a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua +++ b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua @@ -30,7 +30,8 @@ local basicParams = { { Flag,"client_to_client",0, translate("Allow client-to-client traffic") }, { DynamicList,"remote","vpnserver.example.org", translate("Remote host name or ip address") }, - { FileUpload,"secret","/etc/openvpn/secret.key 1", translate("Enable Static Key encryption mode (non-TLS)") }, + { FileUpload,"secret","/etc/openvpn/secret.key", translate("Enable Static Key encryption mode (non-TLS)") }, + { Value,"key_direction","1", translate("The key direction for 'tls-auth' and 'secret' options") }, { FileUpload,"pkcs12","/etc/easy-rsa/keys/some-client.pk12", translate("PKCS#12 file containing keys") }, { FileUpload,"ca","/etc/easy-rsa/keys/ca.crt", translate("Certificate authority") }, { FileUpload,"dh","/etc/easy-rsa/keys/dh1024.pem", translate("Diffie Hellman parameters") }, @@ -61,7 +62,6 @@ for _, option in ipairs(basicParams) do o.value = option[3] else if option[1] == DynamicList then - o.cast = nil function o.cfgvalue(...) local val = AbstractValue.cfgvalue(...) return ( val and type(val) ~= "table" ) and { val } or val