Connecting to snap server over internet #100
Replies: 3 comments 8 replies
-
Hm, after setting up SSL certs it seems it's probably not possible without it running on the primary domain on port 80 because of SSL shenanigans. |
Beta Was this translation helpful? Give feedback.
-
The snap camera application requires a HTTPS (SSL) connection to the snap server on the HTTPS default port 443. Changing the HTTPS port 443 is not possible without making additional changes to the binary with a hex editor. You might want to read through: #24 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I'm running the snap server containers on a server with a public IP. There is already an Apache server on port 80, so I can't just run it there. I initially set up the server using AutoConfig.
I've configured my .env like so:
And I have a proxy in Apache redirecting a subdomain to the NGINX local port like so:
This appears to work....mostly. If I go to snap.mydomain.com in my web browser from where I'm running Snap Camera, I see the standard unconfigured nginx page:
So the request is getting through to nginx, at least.
I have the following in my /etc/hosts (Windows):
However, Snap Camera does not seem to load. The log is not terribly helpful:
I have also tried pointing directly at 5645 instead of going through the nginx web proxy. In the web browser this results in getting an empty json object
{}
. No change in Snap Camera.I suspected the issue is that /etc/hosts can only define domain names to IP addresses, so I added a rewrite rule so that if someone tries to access the server IP with a URL that includes studio-app, it redirects them to the snap.mydomain.com URL.
Now if I access
studio-app.snapchat.com
in my web browser I see the nginx page. Snap Camera also appears to try to connect now, but fails with SSL errors:I tried adding the certificates AutoConfig generated to the proxy, but that only seemed to make matters worse:
Any ideas for next steps? Maybe I need to get LetsEncrypt going and get a real SSL cert?
Beta Was this translation helpful? Give feedback.
All reactions