My question is about how TOR handles routing of traffic. Here's the situation: User has laptop1 and server1 on a LAN. The server runs a hidden service (say a webserver) sharing over TOR only, i.e. open to localhost only, at xxyyzzaabbcc.onion. The server allows TOR proxy connections from the LAN.
If the user points configures his laptop to use server1:9050 as a proxy and navigates to xxyyzzaabbcc.onion, does the local TOR instance on server 1 recognize that traffic as local and simply forward the request to localhost, or does the traffic first go out over the TOR network, then back to server1's localhost to get to the webserver?
Put another way, if someone on the LAN uses server1's proxy to access that proxy's hidden service, does the traffic stay local?