private String parseHttpHost(byte[] buffer, int offset, int size) {
        String header = new String(buffer, offset, size);
        String[] headers = header.split(NetBareUtils.LINE_END_REGEX);
        if (headers.length <= 1) {
            return null;
        }
        for (int i = 1; i < headers.length; i++) {
            String requestHeader = headers[i];
            // Reach the header end
            if (requestHeader.isEmpty()) {
                return null;
            }
            String[] nameValue = requestHeader.split(":");
            if (nameValue.length < 2) {
                return null;
            }
            String name = nameValue[0].trim();
            String value = requestHeader.replaceFirst(nameValue[0] + ": ", "").trim();
            if (name.toLowerCase().equals("host")) {
                return value;
            }
        }
        return null;
    }
This policy doesn't allow data flow to configured virtual gateway.
netbare-core/src/main/java/com/github/megatronking/netbare/NetBareVirtualGateway.java