you can always cheat …
(this is a very old snap (originally created during the 15.04 cycle), nowadays you might be able to simply use systemd’s socket activation for your daemon entry in snapcraft.yaml)
https://github.com/ogra1/packageproxy/blob/master/run-approx#L25