Skip to content

Commit

Permalink
fix tls setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Jrohy committed Sep 19, 2019
1 parent 11cbdcc commit 0f3af04
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 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.5.0'
__version__ = '3.5.2'

from .util_core.trans import _
4 changes: 2 additions & 2 deletions v2ray_util/config_modify/cdn.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def openHttps(self):
TLSModifier(self.group_tag, self.group_index, self.domain).turn_on()

def modify():
gs = GroupSelector("run cdn mode")
gs = GroupSelector(_("run cdn mode"))
group = gs.group

if group == None:
Expand Down Expand Up @@ -65,7 +65,7 @@ def modify():

if input_ip != local_ip:
print(_("domain can't analysis to local ip!!!"))
print(_("if cdn is cloudclare, must open dns only mode!"))
print(_("must be close cdn proxy!"))
print("")
return

Expand Down
13 changes: 7 additions & 6 deletions v2ray_util/config_modify/tls.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ def turn_on(self):
print(_("2. Customize certificate(prepare certificate file paths)"))
print("")
choice=input(_("please select: "))
input_domain = self.domain
if choice == "1":
if not self.domain:
if not input_domain:
local_ip = get_ip()
print(_("local vps ip address: ") + local_ip + "\n")
input_domain=input(_("please input your vps domain: "))
input_domain = input(_("please input your vps domain: "))
try:
input_ip = socket.gethostbyname(input_domain)
except Exception:
Expand All @@ -48,12 +49,12 @@ def turn_on(self):
if not os.path.exists(crt_file) or not os.path.exists(key_file):
print(_("certificate cert or key not exist!"))
return
if not self.domain:
domain = input(_("please input the certificate cert file domain: "))
if not domain:
if not input_domain:
input_domain = input(_("please input the certificate cert file domain: "))
if not input_domain:
print(_("domain is null!"))
return
self.writer.write_tls(True, crt_file=crt_file, key_file=key_file, domain=domain)
self.writer.write_tls(True, crt_file=crt_file, key_file=key_file, domain=input_domain)
else:
print(_("input error!"))

Expand Down
Binary file modified v2ray_util/locale_i18n/zh_CH/LC_MESSAGES/lang.mo
Binary file not shown.
8 changes: 4 additions & 4 deletions v2ray_util/locale_i18n/zh_CH/LC_MESSAGES/lang.po
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,8 @@ msgstr "V2ray MTProto/Shadowsocks协议不支持配置https!!!"
### tls.py end ###

### cdn.py start ###
msgid "1.run cdn mode"
msgstr "1.走cdn模式"
msgid "run cdn mode"
msgstr "走cdn模式"

msgid "1.80 port + ws"
msgstr "1.80端口 + ws"
Expand All @@ -597,8 +597,8 @@ msgstr "请输入走cdn的域名: "
msgid "domain is empty!"
msgstr "域名为空!"

msgid "if cdn is cloudclare, must open dns only mode!"
msgstr "如果是cloudclare cdn, 则需开启dns only模式!"
msgid "must be close cdn proxy!"
msgstr "必须先关闭cdn的代理!"

### update_timer.py start ###

Expand Down

0 comments on commit 0f3af04

Please sign in to comment.