Skip to content

Commit

Permalink
fix http cdn no restart
Browse files Browse the repository at this point in the history
  • Loading branch information
Jrohy committed Dec 7, 2019
1 parent a274f43 commit 021736d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
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.5.3'
__version__ = '3.7.5.4'

from .util_core.trans import _
8 changes: 4 additions & 4 deletions v2ray_util/config_modify/cdn.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def openHttp(self, port=80):
'''
self.gw.write_port(port)
self.gw.write_domain(self.domain)
return True

def openHttps(self, port=443):
'''
Expand All @@ -37,6 +38,7 @@ def openHttps(self, port=443):
@restart()
def closeHttp(self):
self.gw.write_domain()
return True

def modify():
choice, port_choice = "", ""
Expand All @@ -62,7 +64,7 @@ def modify():
print(ColorStr.yellow(_("only support http port cdn close!")))
return
CDNModifier(group.tag, group.index).closeHttp()
return True
return

if check_ip(group.ip):
domain = input(_("please input run cdn mode domain: "))
Expand Down Expand Up @@ -107,6 +109,4 @@ def modify():
if not port_choice:
return
print("")
CDNModifier(group.tag, group.index, domain).openHttps(https_list[port_choice - 1])

return True
CDNModifier(group.tag, group.index, domain).openHttps(https_list[port_choice - 1])
1 change: 0 additions & 1 deletion v2ray_util/util_core/v2ray.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def docker_run(command, keyword):
def run(command, keyword):
try:
subprocess.check_output(command, shell=True)
open_port()
print("{}ing v2ray...".format(keyword))
time.sleep(2)
if subprocess.check_output("systemctl is-active v2ray|grep active", shell=True) or keyword == "stop":
Expand Down

0 comments on commit 021736d

Please sign in to comment.