Building42 / Telegraph

Secure Web Server for iOS, tvOS and macOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IOS Test App provided does not allow connection from outside device

ZackHon12027 opened this issue · comments

When running on Simulator it works fine, However. When running on Iphone you will get a ERROR: connect ECONNREFUSED. Error is true for both HTTP and HTTPS

TestApp on Main branch used. Not sure if It came by default but I added Allows Local Networking
Screen Shot 2022-10-07 at 5 14 39 PM

Here are some samples
(Simulator)
Screen Shot 2022-10-07 at 5 12 43 PM

(IOS-Iphone 13 Pro with OS 16.0.2)
Screen Shot 2022-10-07 at 5 13 42 PM

Hi, when you create the Server, please make sure that you're not binding it to interface localhost.

// This server will only be accessible on localhost
try! server.start(port: 9000, interface: "localhost")

// This server will be accessible from other devices
try! server.start(port: 9000)

Next, when you try to connect to the Telegraph server running on your phone, make sure that you connect using the IP address of your phone instead of localhost

I'll close this for now, let me know if you run into any issues.