You can do it.
First make your 2 wormholes, but if you want to make 2 things like that are in different star systems, you have to make them both in the same star system then drag one out of it and put it somewhere else otherwise they wont connect. Then conect them up and click on the line and change "ConnectionType" from PhaseLane to Wormhole.