iPhone HTTP Server

前端 未结 4 1863
北荒
北荒 2021-02-03 15:39

Can someone give me simple code to help with creating an HTTP server for the iPhone. Something simple with much documentation would be appreciated. Anything you have please shar

4条回答
  •  不思量自难忘°
    2021-02-03 16:30

    It is possible to run a simple file server on iPhone/iOS. I was able to use this method successfully. Here are the steps to create a simple file server which works on http protocol. 1. Install TestFlight app for iOS 2. Install iSH app from the Apple store or side load it from their website, as this app might not be available in the store depending on your country. I tried it from india in May 2020, and the app was not available in the store. So i did side load it from their website. 3. With iSH app, one has access to linux kernel of the iPhone. I did use a simple http server module from python and executed it on the linux shell. 4. Command to run the python based server on iPhone : Python -m http.server 8080 5. Access the file server using the local ip that’s assigned to the iPhone in the network you are connected to. That means, if iPhone is connected to a WiFi SSID, depending on whether the router is configured to use static IP address assignment based on MAC address or using DHCP protocol, your iPhone will have an internal IP assigned by the router. 6. Command to access the file server : http://192.168.1.3:8080 - modify the address depending on IP address of the iPhone and the port that server running on iPhone is configured to use. Paste this in a browser - one should be able to see the files listed in the directory where the server is running in.

    Hope this was clear enough, for running a simple http based file server on iPhone using http.server module in python, over linux shell of the underlying kernel, using iSH.

提交回复
热议问题