package com.westudio.java.server;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class ForwardTunnelServlet extends TunnelServlet {

    @Override
    protected void doTunnel(HttpServletRequest req, HttpServletResponse res) {

    }
}

@@ -28,16 +28,56 @@
 erver;%0A%0A
+import com.westudio.java.util.Numbers;%0A%0A
 import j
@@ -114,16 +114,16 @@
 equest;%0A
-
 import j
@@ -160,16 +160,44 @@
 esponse;
+%0Aimport java.io.IOException;
 %0A%0Apublic
@@ -342,16 +342,266 @@
  res) %7B%0A
+        final int port = Numbers.parseInt(req.getHeader(%22Listen%22));%0A%0A        if (port %3C 0) %7B%0A            try %7B%0A                res.sendError(HttpServletResponse.SC_BAD_REQUEST);%0A            %7D catch (IOException e) %7B/**/%7D%0A            return;%0A        %7D
 %0A    %7D%0A%7D

update the ForwardTunnelServlet….