|
|
|
@ -86,26 +86,52 @@ svr:value("us-atl.torguard.com", "USA Atlanta")
|
|
|
|
|
svr:value("us-ny.torguard.com", "USA New York")
|
|
|
|
|
svr:value("us-chi.torguard.com", "USA Chicago")
|
|
|
|
|
|
|
|
|
|
-- Dedicated IP Option
|
|
|
|
|
dedicated = s:option(ListValue, "dedicated", translate("Use Dedicated IP"))
|
|
|
|
|
dedicated:value("YES")
|
|
|
|
|
dedicated:value("NO")
|
|
|
|
|
|
|
|
|
|
dediserver = s:option(Value, "dediserver", translate("Dedicated IP"))
|
|
|
|
|
|
|
|
|
|
protocol = s:option(ListValue, "protocol", translate("VPN Protocol"))
|
|
|
|
|
protocol:value("udp")
|
|
|
|
|
protocol:value("tcp")
|
|
|
|
|
|
|
|
|
|
port = s:option(ListValue, "port", translate("VPN Port"))
|
|
|
|
|
-- Add all ports here
|
|
|
|
|
port:value("1912|SHA256", "1912|SHA256")
|
|
|
|
|
port:value("1195|SHA256", "1195|SHA256")
|
|
|
|
|
port:value("53|SHA256", "53|SHA256")
|
|
|
|
|
port:value("1198|SHA256", "1198|SHA256")
|
|
|
|
|
port:value("9201|SHA256", "9201|SHA256")
|
|
|
|
|
port:value("501|SHA256", "501|SHA256")
|
|
|
|
|
port:value("1194|SHA1", "1194|SHA1")
|
|
|
|
|
port:value("995|SHA1", "995|SHA1")
|
|
|
|
|
port:value("1215|SHA512", "1215|SHA512")
|
|
|
|
|
port:value("389|SHA512", "389|SHA512")
|
|
|
|
|
port:value("80|SHA1", "80|SHA1")
|
|
|
|
|
port:value("443|SHA1", "443|SHA1")
|
|
|
|
|
|
|
|
|
|
cipher = s:option(ListValue, "cipher", translate("VPN Cipher"))
|
|
|
|
|
-- Add all cipher options here
|
|
|
|
|
cipher:value("AES-128-CBC")
|
|
|
|
|
cipher:value("AES-256-CBC")
|
|
|
|
|
cipher:value("AES-128-GCM")
|
|
|
|
|
cipher:value("AES-256-GCM")
|
|
|
|
|
cipher:value("BF-CBC")
|
|
|
|
|
|
|
|
|
|
-- VPN Control: Start/Stop OpenVPN
|
|
|
|
|
ctrl = m:section(TypedSection, "ovpnconfig", "VPN Control: Start/Stop OpenVPN")
|
|
|
|
|
ctrl.anonymous = true
|
|
|
|
|
ctrl.addremove = false
|
|
|
|
|
|
|
|
|
|
btnStop = ctrl:option(Button, "_btn_stop", translate("Click to Stop OpenVPN"))
|
|
|
|
|
btnStop = ctrl:option(Button, "_btn_start", translate("Click to Stop OpenVPN"))
|
|
|
|
|
function btnStop.write()
|
|
|
|
|
os.execute("/etc/init.d/tgopenvpn stop")
|
|
|
|
|
io.popen("/etc/init.d/tgopenvpn stop")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
btnStart = ctrl:option(Button, "_btn_start", translate("Click to Start OpenVPN"))
|
|
|
|
|
btnStart = ctrl:option(Button, "_btn_stop", translate("Click to Start OpenVPN"))
|
|
|
|
|
function btnStart.write()
|
|
|
|
|
os.execute("/etc/init.d/tgopenvpn start")
|
|
|
|
|
io.popen("/etc/init.d/tgopenvpn start")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- Return the configuration page
|
|
|
|
|