@@ -289,7 +289,7 @@ def router_status():
289289@click .help_option ("-h" , "--help" )
290290@click .option ("-a" , "--address" , type = str , required = False , help = "Remote address to bind the tunnel to" )
291291@click .option ("-p" , "--profile" , type = str , required = False , help = "Profile to share" )
292- @click .option ("-http" , type = bool , flag_value = True , required = False , help = "Use HTTP instead of HTTPS" )
292+ @click .option ("-- http" , type = bool , flag_value = True , required = False , help = "Use HTTP instead of HTTPS" )
293293def share (address , profile , http ):
294294 """Create a share link for the MCPRouter daemon process.
295295
@@ -332,15 +332,12 @@ def share(address, profile, http):
332332 remote_host , remote_port = address .split (":" )
333333
334334 # start tunnel
335- # TODO: tls certificate if necessary
336335 tunnel = Tunnel (remote_host , remote_port , config ["host" ], config ["port" ], secrets .token_urlsafe (32 ), http , None )
337336 share_url = tunnel .start_tunnel ()
338337 share_pid = tunnel .proc .pid if tunnel .proc else None
339338 # generate random api key
340339 api_key = str (uuid .uuid4 ())
341340 console .print (f"[bold green]Generated secret for share link: { api_key } [/]" )
342- if http :
343- share_url = share_url .replace ("https://" , "http://" )
344341 share_url = share_url + "/sse"
345342 # save share pid and link to config
346343 config_manager .save_share_config (share_url , share_pid , api_key )
0 commit comments