【发布时间】:2020-01-31 22:47:21
【问题描述】:
我试图用options 运行ngrok 我试过了
from pyngrok import ngrok
ngrokPublicUrl = ngrok.connect(5000, bind_tls= True)
和
ngrokPublicUrl = ngrok.connect(remote_addr=5000, bind_tls= True)
对于选项,我在这里使用了文档 --> https://ngrok.com/docs#tunnel-definitions。我正在尝试获取 https 地址而不是 http。看起来options 用法不正确?
但我收到此错误
TypeError: connect() got an unexpected keyword argument 'remote_addr'
或
TypeError: connect() got an unexpected keyword argument 'bind_tls'
【问题讨论】:
-
来自 pyngrok 文档:“connect() 方法还可以采用 options 参数,它允许我们传递 ngrok 支持的其他选项。”所以像
ngrok.connect(options={'remote_addr': 5000, 'bind_tls': True})我认为 -
Thx 我正在寻找已经尝试过的 python 用法 --> ngrok.connect('remote_addr':5000) 或 ngrok.connect('remote_addr'=5000) 问题是用法我该如何使用它使用 python 或语法