mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-02 14:13:56 +08:00
update 2026-09-20 02:20:59
This commit is contained in:
1 parent
deb27aee9d
commit
33c69f15d2
1985 files changed
+460
-1523312
No files matched your search
@@ -45,6 +45,7 @@ return view.extend({
|
||||
o.rmempty = false;
|
||||
o.value('dhcp', _('DHCP client'));
|
||||
o.value('pppoe', _('PPPoE'));
|
||||
o.value('siderouter', _('Siderouter'));
|
||||
|
||||
o = s.taboption('netsetup', form.Value, 'wan_pppoe_user', _('PAP/CHAP username'));
|
||||
o.depends('wan_proto', 'pppoe');
|
||||
@@ -60,19 +61,15 @@ return view.extend({
|
||||
o.datatype = 'ip4addr';
|
||||
o.cast = 'string';
|
||||
|
||||
o = s.taboption('netsetup', form.Flag, 'siderouter', _('Siderouter'),
|
||||
_('Use as downstream router i.e. it will work like a switch'));
|
||||
o.rmempty = false;
|
||||
|
||||
o = s.taboption('netsetup', form.Value, 'lan_gateway', _('IPv4 gateway'));
|
||||
o.depends('siderouter', '1');
|
||||
o.depends('wan_proto', 'siderouter');
|
||||
o.datatype = 'ip4addr';
|
||||
o.placeholder = _('Enter the main router IP');
|
||||
o.rmempty = false;
|
||||
|
||||
o = s.taboption('netsetup', form.Flag, 'dhcp', _('DHCP Server'),
|
||||
_('To turn on this DHCP, you need to turn off the DHCP of the main router, and to turn off this DHCP, you need to manually change the gateway and DNS of all Internet devices to the IP of this bypass router'));
|
||||
o.depends('siderouter', '1');
|
||||
o.depends('wan_proto', 'siderouter');
|
||||
o.default = o.enabled;
|
||||
|
||||
o = s.taboption('netsetup', form.Flag, 'ipv6', _('Enable IPv6'), _('Enable/Disable IPv6'));
|
||||
|
||||
@@ -63,12 +63,16 @@ add_wizard() {
|
||||
[ -n "$lan_dns" ] || lan_dns='223.5.5.5'
|
||||
[ -n "$dhcp" ] && uci -q set dhcp.lan.ignore="1" || uci -q del dhcp.lan.ignore
|
||||
uci -q set firewall.@zone[0].masq='1'
|
||||
uci -q set network.wan.proto='none'
|
||||
WAN=$(uci -q get network.wan.device)
|
||||
uci add_list network.@device[0].ports="$WAN" 2>/dev/null
|
||||
uci -q delete network.wan
|
||||
uci -q delete network.wan6
|
||||
elif [ "${siderouter}" == "0" ]; then
|
||||
uci -q del network.lan.gateway
|
||||
uci -q del dhcp.lan.ignore
|
||||
uci -q del network.lan.dns
|
||||
uci -q del firewall.@zone[0].masq
|
||||
uci -q set network.wan.device='eth1'
|
||||
uci -q set network.wan.proto='dhcp'
|
||||
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user