Progress!
I now have Plexconnect working happily on my ATV3, streaming content from my Synology DS412+, while the Synology is also serving web pages on port 443 via HTTPS. It's not perfect, but progress is progress.
The problem:
A quirk in the way the webserver on the 412+ is set up means that while you can specify additional port(s) for HTTPS, you can't disable serving HTTPS from port 443. Unfortunately, serving content from port 443 is required for plexconnect to work.
The (mostly) fix:
As reported in another thread, it's possible to use ipTables to port forward from port 443 to a custom port you specify in plexconnect's settings.cfg, by restricting the forwarding to just one device (ip address).
The quirks:
The ipTables command to run looks like this:
iptables -t nat -A PREROUTING -i [interface] -p tcp --syn -s [source IP] -d [destination IP] --dport 443 -j DNAT --to-destination [destination IP]:[custom port]
where:
[interface] is the network interface active on your Diskstation: mine was eth0, but it depends on your model and configuration
[source IP] is the IP address of your Apple TV. Time to assign it a fixed IP address, if you haven't already.
[destination IP] is the IP address of your Diskstation. This should also be fixed (and is probably static)
[custom port] is the new port number for the plexconnect SSL webserver you specified in Settings.cfg.
Unfortunately when I first tried this I got an error message from ipTables about missing modules.
My solution, from start to finish:
1. Go to the package manager and stop the Plexconnect package. While you're here, install the VPN Server package from the official repo
2. Go to the Plexconnect folder (/volume1/@appstore/plexconnect/share/PlexConnect, probably) and edit the Settings.cfg file to change the port_SSL value to something other than 443. I went with 9999.
3. From the main menu, go to the VPN Server and activate one of the servers. I activated the OpenVPN server.
4. Add a new rule to the Firewall (Control Panel > Security > Firewall) which allows all from all. I'm not 100% sure this is required.
5. issue the iptables command, customised for your IP addresses and chosen port
6. Go back to the package manager and restart Plexconnect.
Problems/to do:
1. I don't really want to have an OpenVPN server running on my diskstation, but I haven't as yet figured out how to tell ipTables to load the relevant modules independently of the VPN server package.
2. The firewall rule won't persist past a reboot, so I need to figure out where the 'rules loaded at boot' configuration file lives and edit it to make sure the port forwarding rule is added automatically
I'll update this once I figure out the problems/to-do (any hints happily received!)