Since the above poster mentions Lhasa, I wanted to point out that LXA is the one exception to the Being-Allowed-to-Leave-the-Airport-During-TWOV-Rule. If you are just making a connection and do not have a Tibet Travel Permit (= a prearranged stopover tour), then you will not be allowed to leave the terminal and will be in a holding area until your onward flight to elsewhere.