You’ll need to customize the LinkingTool:
$(go.Diagram, . . .,
{
"linkingTool.findLinkablePort": function() {
const diagram = this.diagram;
let obj = this.startObject;
if (obj === null) {
obj = diagram.findObjectAt(diagram.firstInput.documentPoint, null, null);
}
if (obj === null) return null;
const part = obj.part;
if (!(part instanceof go.Node)) return null;
return part.port; // use the default port
},
This assumes that every Node is “linkable”. If that might not be the case, due to LinkingTool.direction or GraphObject.fromLinkable or toLinkable, the override will have to be smarter.