Skip to content

Commit

Permalink
Fix iptables rule bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Jrohy committed Feb 18, 2020
1 parent c267140 commit ab13e6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion v2ray_util/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = '3.7.7.3'
__version__ = '3.7.7.4'

from .util_core.trans import _
2 changes: 2 additions & 0 deletions v2ray_util/util_core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ def open_port(openport=-1):
iptable_way = "iptables" if profile.network == "ipv4" else "ip6tables"
if openport != -1:
port_str = str(openport)
if len(os.popen(check_cmd.format(iptable_way, port_str)).readlines()) > 0:
return
if is_centos8:
os.system(firewall_open_cmd.format(port_str, port_str))
else:
Expand Down

0 comments on commit ab13e6c

Please sign in to comment.