I'm going throught similiar efforts. Here's my idea:
User wants to create a route.
User clicks on start point and then user clicks on end point.
Check to see if start point is a node. If it is, use it for routing. If it's not, see if it's a edge. If it is, use linear referencing functions to create a virtual node and use the nearest node (from your virtual node) as input for the routing function.
If it's not a node and not an edge, select the nearest edge and from that nearest edge select the nearest node. Use that node for routing. Keep that other results to be inserted and the beggining of the routing function.
Check to see if end point is a node. If it is, use it for routing. If it's not a node, see if intersects and edge. If the clicked point intersects an edge, use linear referencing functions to create a virtual node and use the nearest node (from end virtual node) as input for routing function.
If it's not a node and not an edge, select the nearest edge and from that nearest edge select the nearest node. Use that node for routing. Keep that other results to be inserted and the end of the routing function.
If you created your virtual nodes in memory, you can tweak the result for routing. If the user clicked outside the network, you will need to add a routing leg in the start or end.
Once you find the nearest edge and the node you will start routing, it's easy. Trace a line from the clicked point to the nearest edge, and trace a line from that intersection point (new virtual edge) to the start routing point.
Do the other way around for end nodes.