mirror of
https://github.com/coolsnowwolf/luci
synced 2025-01-07 07:06:41 +08:00
luci-app-ipsec-vpnd: code alignment
This commit is contained in:
parent
120784ab10
commit
ab0210a0c0
@ -2,7 +2,7 @@ mp = Map("ipsec")
|
||||
mp.title = translate("IPSec VPN Server")
|
||||
mp.description = translate("IPSec VPN connectivity using the native built-in VPN Client on iOS or Andriod (IKEv1 with PSK and Xauth)")
|
||||
|
||||
mp:section(SimpleSection).template = "ipsec/ipsec_status"
|
||||
mp:section(SimpleSection).template = "ipsec/ipsec_status"
|
||||
|
||||
s = mp:section(NamedSection, "ipsec", "service")
|
||||
s.anonymouse = true
|
||||
@ -12,14 +12,14 @@ enabled.default = 0
|
||||
enabled.rmempty = false
|
||||
|
||||
clientip = s:option(Value, "clientip", translate("VPN Client IP"))
|
||||
clientip.datatype = "ip4addr"
|
||||
clientip.description = translate("LAN DHCP reserved started IP addresses with the same subnet mask")
|
||||
clientip.datatype = "ip4addr"
|
||||
clientip.optional = false
|
||||
clientip.rmempty = false
|
||||
|
||||
clientdns = s:option(Value, "clientdns", translate("VPN Client DNS"))
|
||||
clientdns.datatype = "ip4addr"
|
||||
clientdns.description = translate("DNS using in VPN tunnel.Set to the router's LAN IP is recommended")
|
||||
clientdns.datatype = "ip4addr"
|
||||
clientdns.optional = false
|
||||
clientdns.rmempty = false
|
||||
|
||||
|
@ -30,5 +30,3 @@ msgstr "禁止开机启动"
|
||||
|
||||
msgid "Enable on startup"
|
||||
msgstr "允许开机启动"
|
||||
|
||||
|
||||
|
@ -19,41 +19,41 @@ uci -q batch <<-EOF >/dev/null
|
||||
|
||||
commit network
|
||||
|
||||
delete firewall.ike
|
||||
add firewall rule
|
||||
rename firewall.@rule[-1]="ike"
|
||||
set firewall.@rule[-1].name="ike"
|
||||
set firewall.@rule[-1].target="ACCEPT"
|
||||
set firewall.@rule[-1].src="wan"
|
||||
set firewall.@rule[-1].proto="udp"
|
||||
set firewall.@rule[-1].dest_port="500"
|
||||
delete firewall.ike
|
||||
add firewall rule
|
||||
rename firewall.@rule[-1]="ike"
|
||||
set firewall.@rule[-1].name="ike"
|
||||
set firewall.@rule[-1].target="ACCEPT"
|
||||
set firewall.@rule[-1].src="wan"
|
||||
set firewall.@rule[-1].proto="udp"
|
||||
set firewall.@rule[-1].dest_port="500"
|
||||
|
||||
delete firewall.ipsec
|
||||
add firewall rule
|
||||
rename firewall.@rule[-1]="ipsec"
|
||||
set firewall.@rule[-1].name="ipsec"
|
||||
set firewall.@rule[-1].target="ACCEPT"
|
||||
set firewall.@rule[-1].src="wan"
|
||||
set firewall.@rule[-1].proto="udp"
|
||||
set firewall.@rule[-1].dest_port="4500"
|
||||
delete firewall.ipsec
|
||||
add firewall rule
|
||||
rename firewall.@rule[-1]="ipsec"
|
||||
set firewall.@rule[-1].name="ipsec"
|
||||
set firewall.@rule[-1].target="ACCEPT"
|
||||
set firewall.@rule[-1].src="wan"
|
||||
set firewall.@rule[-1].proto="udp"
|
||||
set firewall.@rule[-1].dest_port="4500"
|
||||
|
||||
delete firewall.ah
|
||||
add firewall rule
|
||||
rename firewall.@rule[-1]="ah"
|
||||
set firewall.@rule[-1].name="ah"
|
||||
set firewall.@rule[-1].target="ACCEPT"
|
||||
set firewall.@rule[-1].src="wan"
|
||||
set firewall.@rule[-1].proto="ah"
|
||||
delete firewall.ah
|
||||
add firewall rule
|
||||
rename firewall.@rule[-1]="ah"
|
||||
set firewall.@rule[-1].name="ah"
|
||||
set firewall.@rule[-1].target="ACCEPT"
|
||||
set firewall.@rule[-1].src="wan"
|
||||
set firewall.@rule[-1].proto="ah"
|
||||
|
||||
delete firewall.esp
|
||||
add firewall rule
|
||||
rename firewall.@rule[-1]="esp"
|
||||
set firewall.@rule[-1].name="esp"
|
||||
set firewall.@rule[-1].target="ACCEPT"
|
||||
set firewall.@rule[-1].src="wan"
|
||||
set firewall.@rule[-1].proto="esp"
|
||||
delete firewall.esp
|
||||
add firewall rule
|
||||
rename firewall.@rule[-1]="esp"
|
||||
set firewall.@rule[-1].name="esp"
|
||||
set firewall.@rule[-1].target="ACCEPT"
|
||||
set firewall.@rule[-1].src="wan"
|
||||
set firewall.@rule[-1].proto="esp"
|
||||
|
||||
delete firewall.VPN
|
||||
delete firewall.VPN
|
||||
set firewall.VPN=zone
|
||||
set firewall.VPN.name="VPN"
|
||||
set firewall.VPN.input="ACCEPT"
|
||||
@ -61,13 +61,13 @@ uci -q batch <<-EOF >/dev/null
|
||||
set firewall.VPN.output="ACCEPT"
|
||||
set firewall.VPN.network="VPN"
|
||||
|
||||
delete firewall.vpn
|
||||
delete firewall.vpn
|
||||
set firewall.vpn=forwarding
|
||||
set firewall.vpn.name="vpn"
|
||||
set firewall.vpn.dest="wan"
|
||||
set firewall.vpn.src="VPN"
|
||||
|
||||
commit firewall
|
||||
commit firewall
|
||||
EOF
|
||||
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
|
Loading…
Reference in New Issue
Block a user