finally got http tunnel logic working.