For tuning's sake you probably don't want to mess with any big changes in atmospheric pressure at the end of the exhaust. A two stroke is going to be more sensitive to this than a four. So just extending the pipe out the window with a hose connected to the exhaust is going to add back-pressure.
When I've run a two stroke indoors I've set a good sized cardboard box, opened at one end, that end facing the exhaust, plug a shop vac hose into the other end of the box, and run a hose from the shop vac's exhaust out a window. 100 percent effective without altering the tuning of the pipe.