itsjunetime / smserver

An app to allow Jailbroken iPhones to send texts & attachments from their browser
GNU General Public License v3.0
157 stars 26 forks source link

multiple requests to trust certificate websocket xxx.8750 (set in settings) #137

Closed unpollo2 closed 3 years ago

unpollo2 commented 3 years ago

iphone7 ios 14.6 accessing through android galaxy fold 2 via chrome

i cannot find a way to accept trust/certificate for websocket 8750 i enter the ip address specified by the popup msg but it never connects. am i supposed to make another port forwarding just for the websocket? i only did 1 port forwarding for the browser connection,

sabogalc commented 3 years ago

If you are using port forwarding, yes, you need to forward both the port on the app homescreen as well as the Websocket port in settings, and they cannot be the same port. However, this has me wondering why there is a separate Websocket port and why it doesn't all go through one port. I'm pretty sure Remote Messages only utilized one port and it had Websocket support as well.

unpollo2 commented 3 years ago

The app won't let the port on home screen be the same as websocket port in settings.

I cannot get it to work with SSL enabled so I disabled it and used http

If the websocket is 8750 in my single port forwarding rules is that external or internal port? What would be the other port? I used 80 for the original web connection.

unpollo2 commented 3 years ago

Screenshot_20210719-085759_Chromepe

sabogalc commented 3 years ago

Yep, so now navigate to the website with your WebSocket port, and then go back to the original site with your messages on it. That should do the trick.

unpollo2 commented 3 years ago

still having problems:

currently i have this 1 port fwd rule: external port 80 internal port 8765 which is the port shown on SMserver home screen tcp and udp both selected

when adding the websocket (which is 8750 in settings) what do i put as external port and internal port? i tried external 129 and internal 8750 but it won't let me visit that site

sabogalc commented 3 years ago

When setting your port forwarding rules, the external and internal ports are the same. So you would have external port 8765 and internal port 8765 for the main SMServer port and external port 8750 and internal port 8750 for your two forwarded ports. As for why you can't see images, I'm not really sure. My guess is that the images are HEIC and you are facing issue #105, but maybe that's not it. I'm sure the developer would be able to help you debug that further.

unpollo2 commented 3 years ago

thanks this fixed the issue no more popup messages. i did not even have to visit the 8750 websocket address.

itsjunetime commented 3 years ago

Thanks for helping out with this, @CSab6482; I appreciate it.

However, this has me wondering why there is a separate Websocket port and why it doesn't all go through one port. I'm pretty sure Remote Messages only utilized one port and it had Websocket support as well.

The reason Remote Messages/WebMessage can run both on the same port and SMServer can't is that WebMessage (and probably Remote Messages as well, though I don't know for sure) use a single framework for both the HTTP server & the websocket. However, I use two different frameworks (one for the HTTP Server and the other for the websocket). The reason for this (I suspect) is simply that we came to different solutions for the same problem.

We all needed a web framework that supported:

  1. uploading files/sending binary data to the host
  2. TLS/HTTPS
  3. Websockets
  4. Lightweight enough to be put in an iPhone app

I decided that to solve number 1, I wanted to do HTML file uploads (which is normally the accepted method for uploading files/binary data on a website), and with that requirement, I couldn't find a single web framework that fit all my requirements, so I decided to just use two, working together. I know that with WebMessage, however, they set up a system to allow binary data for attachments to be sent over the websocket connection, which allows them to just use one framework and not set up websocket/server on different ports.

With my new remote connection system, I could probably change it so that attachments are sent over the websocket connection as well, which would allow me to deprecate the other framework and change SMServer to only use one port, but that would be a big change, so I'm not planning on doing it anytime soon (if ever).

sabogalc commented 3 years ago

Thank you for the explanation! That makes a lot of sense, and I understand that it would be a huge change to try and change how SMServer handles its frameworks. I'm really excited for the upcoming remote connection System and the possibility of SMServer client apps.