ngrok.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:websauna 作者: websauna 项目源码 文件源码
def __init__(self, port:int, auth_token:str, subdomain:str):
        """Build ngrok HTTP tunnel

        Assume ngrok version 2.x. A temporary ngrok configuration file is created where the ngrok token is stored for running the command.

        :param port: localhost port forwarded through tunnel

        :param auth_token: Ngrok auth token to use

        :param subdomain: Use this subdomain for the tunnelling
        """
        assert find_executable("ngrok"), "ngrok command must be installed, see https://ngrok.com/"
        self.port = port
        self.auth_token = auth_token
        self.subdomain = subdomain
        self.ngrok = None
        self.config_file_handle, self.config_file = tempfile.mkstemp()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号