@@ -4655,23 +4655,24 @@ def setuptunnel(global_memory, has_sd):
4655
4655
import re
4656
4656
global sslvalid
4657
4657
httpsaffix = ("https" if sslvalid else "http" )
4658
+ ssladd = (" --no-tls-verify" if sslvalid else "" )
4658
4659
def run_tunnel ():
4659
4660
tunnelproc = None
4660
4661
tunneloutput = ""
4661
4662
tunnelrawlog = ""
4662
4663
time .sleep (0.2 )
4663
4664
if os .name == 'nt' :
4664
4665
print ("Starting Cloudflare Tunnel for Windows, please wait..." , flush = True )
4665
- tunnelproc = subprocess .Popen (f"cloudflared.exe tunnel --url { httpsaffix } ://localhost:{ args .port } " , text = True , encoding = 'utf-8' , shell = True , stdout = subprocess .DEVNULL , stderr = subprocess .PIPE )
4666
+ tunnelproc = subprocess .Popen (f"cloudflared.exe tunnel --url { httpsaffix } ://localhost:{ args .port } { ssladd } " , text = True , encoding = 'utf-8' , shell = True , stdout = subprocess .DEVNULL , stderr = subprocess .PIPE )
4666
4667
elif sys .platform == "darwin" :
4667
4668
print ("Starting Cloudflare Tunnel for MacOS, please wait..." , flush = True )
4668
- tunnelproc = subprocess .Popen (f"./cloudflared tunnel --url { httpsaffix } ://localhost:{ args .port } " , text = True , encoding = 'utf-8' , shell = True , stdout = subprocess .DEVNULL , stderr = subprocess .PIPE )
4669
+ tunnelproc = subprocess .Popen (f"./cloudflared tunnel --url { httpsaffix } ://localhost:{ args .port } { ssladd } " , text = True , encoding = 'utf-8' , shell = True , stdout = subprocess .DEVNULL , stderr = subprocess .PIPE )
4669
4670
elif sys .platform == "linux" and platform .machine ().lower () == "aarch64" :
4670
4671
print ("Starting Cloudflare Tunnel for ARM64 Linux, please wait..." , flush = True )
4671
- tunnelproc = subprocess .Popen (f"./cloudflared-linux-arm64 tunnel --url { httpsaffix } ://localhost:{ args .port } " , text = True , encoding = 'utf-8' , shell = True , stdout = subprocess .DEVNULL , stderr = subprocess .PIPE )
4672
+ tunnelproc = subprocess .Popen (f"./cloudflared-linux-arm64 tunnel --url { httpsaffix } ://localhost:{ args .port } { ssladd } " , text = True , encoding = 'utf-8' , shell = True , stdout = subprocess .DEVNULL , stderr = subprocess .PIPE )
4672
4673
else :
4673
4674
print ("Starting Cloudflare Tunnel for Linux, please wait..." , flush = True )
4674
- tunnelproc = subprocess .Popen (f"./cloudflared-linux-amd64 tunnel --url { httpsaffix } ://localhost:{ args .port } " , text = True , encoding = 'utf-8' , shell = True , stdout = subprocess .DEVNULL , stderr = subprocess .PIPE )
4675
+ tunnelproc = subprocess .Popen (f"./cloudflared-linux-amd64 tunnel --url { httpsaffix } ://localhost:{ args .port } { ssladd } " , text = True , encoding = 'utf-8' , shell = True , stdout = subprocess .DEVNULL , stderr = subprocess .PIPE )
4675
4676
time .sleep (10 )
4676
4677
def tunnel_reader ():
4677
4678
nonlocal tunnelproc ,tunneloutput ,tunnelrawlog
@@ -4929,7 +4930,7 @@ def analyze_gguf_model_wrapper(filename=""):
4929
4930
dumpthread .start ()
4930
4931
4931
4932
def main (launch_args ):
4932
- global args , showdebug , kcpp_instance , exitcounter , using_gui_launcher
4933
+ global args , showdebug , kcpp_instance , exitcounter , using_gui_launcher , sslvalid
4933
4934
args = launch_args #note: these are NOT shared with the child processes!
4934
4935
4935
4936
if (args .version ) and len (sys .argv ) <= 2 :
@@ -5000,6 +5001,10 @@ def main(launch_args):
5000
5001
time .sleep (3 )
5001
5002
sys .exit (2 )
5002
5003
5004
+ if args .ssl : #need to duplicate here for the tunnel
5005
+ if len (args .ssl )== 2 and isinstance (args .ssl [0 ], str ) and os .path .exists (args .ssl [0 ]) and isinstance (args .ssl [1 ], str ) and os .path .exists (args .ssl [1 ]):
5006
+ sslvalid = True
5007
+
5003
5008
# manager command queue
5004
5009
with multiprocessing .Manager () as mp_manager :
5005
5010
global_memory = mp_manager .dict ({"tunnel_url" : "" , "restart_target" :"" , "input_to_exit" :False })
0 commit comments