hssm/SuperStyler

Report port

Closed this issue · 2 comments

I've got another one:
I have a firewall running on my Linux system.
While there is still another firewall separating that box and the mobile device from the outside world, i don't want to switch off that inner firewall. I am OK with opening the one port on that one that is used by this add-on, but there is no easy way to know which one in the original version.

So i have added print("SuperStyler now serving on port {0}".format(server_address[1])) to templateserver.TemplateServer.__init__. (Thet requires that you run Anki from the command line, so it's not a perfect solution.)

hssm commented

I figured the port would be a problem. At the moment, a random free port is chosen, and you can start more than one server at the same time. Each will use a different port. If I restrict it to one port that you can set, I will have to either limit editing to one model at a time (more syncing if you were planning to edit more than one model), or edit the server to hold and serve multiple models (more coding). I'm leaning towards the latter for now.

hssm commented

I've uploaded a newer version of the plugin to AnkiWeb where you can manually set the port. You have to edit the plugin through Anki by going to Tools -> Add-ons -> sstyler -> Edit.... to enable manual port usage and setting the port itself.

Let me know if you have any other issues.