Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync #472

Merged
merged 4 commits into from
Apr 20, 2024
Merged

sync #472

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ return view.extend({
fwtool.addLimitOption(s);
fwtool.addLimitBurstOption(s);

o = s.taboption('advanced', form.Flag, 'v2ray', _('Use V2Ray'),
_('Forward a port (not a range) from server using V2Ray proxy (if enabled) instead of VPN'));
o = s.taboption('advanced', form.Flag, 'v2ray', _('Use V2Ray/XRay'),
_('Forward a port (not a range) from server using V2Ray/XRay proxy (if enabled) instead of VPN'));
o.modalonly = true;
o.editable = true;
o.depends({ src: 'vpn', '!contains': true });
Expand Down
8 changes: 4 additions & 4 deletions openmptcprouter/files/etc/init.d/openmptcprouter-vps
Original file line number Diff line number Diff line change
Expand Up @@ -1070,8 +1070,8 @@ _vps_firewall_redirect_port() {
#return
fi
xray="$v2ray"
[ "$(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 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"
[ "$proto" = "all" ] && proto="tcp udp"
[ "$proto" = "" ] && proto="tcp udp"
[ "$src" = "vpn" ] && [ -n "$proto" ] && [ -n "$src_dport" ] && [ "$enabled" != "0" ] && [ "$name" != "Allow-DHCP-Request-VPN" ] && {
Expand Down Expand Up @@ -1221,7 +1221,7 @@ _vps_firewall_redirect_port() {
fi
if [ "$family" = "ipv4" ]; 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}$")
[ "$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}$")
Expand Down Expand Up @@ -2269,7 +2269,7 @@ _config_service() {
[ -n "$(uci -q get openvpn.omr)" ] && [ -z "$(_set_openvpn_vps)" ] && error=1
[ -n "$(uci -q get mlvpn.general)" ] && [ -z "$(_set_mlvpn_vps)" ] && error=1
_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
_backup_list
redirect_port="0"
Expand Down