mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
sync (#472)
This commit is contained in:
commit
7784e680ad
2 changed files with 6 additions and 6 deletions
|
@ -281,8 +281,8 @@ return view.extend({
|
||||||
fwtool.addLimitOption(s);
|
fwtool.addLimitOption(s);
|
||||||
fwtool.addLimitBurstOption(s);
|
fwtool.addLimitBurstOption(s);
|
||||||
|
|
||||||
o = s.taboption('advanced', form.Flag, 'v2ray', _('Use V2Ray'),
|
o = s.taboption('advanced', form.Flag, 'v2ray', _('Use V2Ray/XRay'),
|
||||||
_('Forward a port (not a range) from server using V2Ray proxy (if enabled) instead of VPN'));
|
_('Forward a port (not a range) from server using V2Ray/XRay proxy (if enabled) instead of VPN'));
|
||||||
o.modalonly = true;
|
o.modalonly = true;
|
||||||
o.editable = true;
|
o.editable = true;
|
||||||
o.depends({ src: 'vpn', '!contains': true });
|
o.depends({ src: 'vpn', '!contains': true });
|
||||||
|
|
|
@ -1070,8 +1070,8 @@ _vps_firewall_redirect_port() {
|
||||||
#return
|
#return
|
||||||
fi
|
fi
|
||||||
xray="$v2ray"
|
xray="$v2ray"
|
||||||
[ "$(uci -q get v2ray.main.enabled)" = "0" ] && [ "$(uci -q get openmptcprouter.omr.v2ray)" != "down" ] && v2ray="0"
|
([ "$(uci -q get v2ray.main.enabled)" = "0" ] || [ "$(uci -q get openmptcprouter.omr.v2ray)" = "down" ]) && v2ray="0"
|
||||||
[ "$(uci -q get xray.main.enabled)" = "0" ] && [ "$(uci -q get openmptcprouter.omr.xray)" != "down" ] && xray="0"
|
([ "$(uci -q get xray.main.enabled)" = "0" ] || [ "$(uci -q get openmptcprouter.omr.xray)" = "down" ]) && xray="0"
|
||||||
[ "$proto" = "all" ] && proto="tcp udp"
|
[ "$proto" = "all" ] && proto="tcp udp"
|
||||||
[ "$proto" = "" ] && proto="tcp udp"
|
[ "$proto" = "" ] && proto="tcp udp"
|
||||||
[ "$src" = "vpn" ] && [ -n "$proto" ] && [ -n "$src_dport" ] && [ "$enabled" != "0" ] && [ "$name" != "Allow-DHCP-Request-VPN" ] && {
|
[ "$src" = "vpn" ] && [ -n "$proto" ] && [ -n "$src_dport" ] && [ "$enabled" != "0" ] && [ "$name" != "Allow-DHCP-Request-VPN" ] && {
|
||||||
|
@ -1221,7 +1221,7 @@ _vps_firewall_redirect_port() {
|
||||||
fi
|
fi
|
||||||
if [ "$family" = "ipv4" ]; then
|
if [ "$family" = "ipv4" ]; then
|
||||||
if [ "$src_dip" = "" ] && [ "$src_ip" = "" ]; then
|
if [ "$src_dip" = "" ] && [ "$src_ip" = "" ]; then
|
||||||
[ "$v2ray" = "1"] && vpsfwlist=$(echo "$vpsfwlist" | grep -v "$src_dport # OMR $username open router $src_dport port ${protoi} --- V2Ray to ${dest_ip}:${dest_port}$")
|
[ "$v2ray" = "1" ] && vpsfwlist=$(echo "$vpsfwlist" | grep -v "$src_dport # OMR $username open router $src_dport port ${protoi} --- V2Ray to ${dest_ip}:${dest_port}$")
|
||||||
[ "$xray" = "1" ] && vpsfwlist=$(echo "$vpsfwlist" | grep -v "$src_dport # OMR $username open router $src_dport port ${protoi} --- XRay to ${dest_ip}:${dest_port}$")
|
[ "$xray" = "1" ] && vpsfwlist=$(echo "$vpsfwlist" | grep -v "$src_dport # OMR $username open router $src_dport port ${protoi} --- XRay to ${dest_ip}:${dest_port}$")
|
||||||
[ "$v2ray" = "1" ] && [ "$username" = "openmptcprouter" ] && vpsfwlist=$(echo "$vpsfwlist" | grep -v "$src_dport # OMR open router $src_dport port ${protoi} --- V2Ray to ${dest_ip}:${dest_port}$")
|
[ "$v2ray" = "1" ] && [ "$username" = "openmptcprouter" ] && vpsfwlist=$(echo "$vpsfwlist" | grep -v "$src_dport # OMR open router $src_dport port ${protoi} --- V2Ray to ${dest_ip}:${dest_port}$")
|
||||||
[ "$xray" = "1" ] && [ "$username" = "openmptcprouter" ] && vpsfwlist=$(echo "$vpsfwlist" | grep -v "$src_dport # OMR open router $src_dport port ${protoi} --- XRay to ${dest_ip}:${dest_port}$")
|
[ "$xray" = "1" ] && [ "$username" = "openmptcprouter" ] && vpsfwlist=$(echo "$vpsfwlist" | grep -v "$src_dport # OMR open router $src_dport port ${protoi} --- XRay to ${dest_ip}:${dest_port}$")
|
||||||
|
@ -2269,7 +2269,7 @@ _config_service() {
|
||||||
[ -n "$(uci -q get openvpn.omr)" ] && [ -z "$(_set_openvpn_vps)" ] && error=1
|
[ -n "$(uci -q get openvpn.omr)" ] && [ -z "$(_set_openvpn_vps)" ] && error=1
|
||||||
[ -n "$(uci -q get mlvpn.general)" ] && [ -z "$(_set_mlvpn_vps)" ] && error=1
|
[ -n "$(uci -q get mlvpn.general)" ] && [ -z "$(_set_mlvpn_vps)" ] && error=1
|
||||||
_set_vps_firewall
|
_set_vps_firewall
|
||||||
[ -n "$(uci -q get wireguard)" ] && [ -z "$(_set_wireguard_vps)" ] && error=1
|
[ -n "$(uci -q show network | grep wireguard)" ] && [ -z "$(_set_wireguard_vps)" ] && error=1
|
||||||
fi
|
fi
|
||||||
_backup_list
|
_backup_list
|
||||||
redirect_port="0"
|
redirect_port="0"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue