diff --git a/docs/index.rst b/docs/index.rst index a28b5a3..32b73a0 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -197,7 +197,7 @@ can be accomplished by using ``pyngrok`` to open a ``tcp`` tunnel to the desired # Open a tunnel to MySQL with a Reserved TCP Address ngrok.connect(3306, "tcp", - remote_addr="1.tcp.ngrok.io:12345") + options={"remote_addr": "1.tcp.ngrok.io:12345"}) We can also serve up local directories via `ngrok's built-in fileserver `_. @@ -295,10 +295,10 @@ Here is an example starting ``ngrok`` in Australia, then opening a tunnel with s from pyngrok.conf import PyngrokConfig from pyngrok import ngrok + options = {"subdomain": "foo", "auth": "username:password"} pyngrok_config = PyngrokConfig(region="au") - url = ngrok.connect(subdomain="foo", - auth="username:password", + url = ngrok.connect(options=options, pyngrok_config=pyngrok_config) Config File diff --git a/docs/integrations.rst b/docs/integrations.rst index 175f93f..d8ea072 100644 --- a/docs/integrations.rst +++ b/docs/integrations.rst @@ -439,7 +439,7 @@ Now create ``server.py`` with the following code: sock.listen(1) # Open a ngrok tunnel to the socket - public_url = ngrok.connect(port, "tcp", remote_addr="{}:{}".format(host, port)) + public_url = ngrok.connect(port, "tcp", options={"remote_addr": "{}:{}".format(host, port)}) print("ngrok tunnel \"{}\" -> \"tcp://127.0.0.1:{}/\"".format(public_url, port)) while True: