Frostilear
Frostilear

Reputation: 1

trying to open a tunnel with ngrok api

I want to use pyngrok's .connect function to route the connection to a specific ip address like 192.168.0.171 instead of the default local host. I've read through the documentation but cannot find anything relevant.

tunnel = ngrok.connect(25565,"tcp")

how do I add the IP address here?

ive tried to put the ip address as a parameter but it just returns a syntax error, can anyone help me change the local host to the ip address: 192.168.0.171

`"tcp://0.tcp.ngrok.io:12345" -> "localhost:22"`

Upvotes: 0

Views: 593

Answers (1)

D Malan
D Malan

Reputation: 11434

You can pass the IP address:port to the connect method as the first argument like this:

tunnel = ngrok.connect("192.168.0.171:25565", "tcp")

Upvotes: 1

Related Questions