亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? threadcommunication.java

?? SOCK VIA HTTP是通過HTTP建立通道的SOCK
?? JAVA
字號:
/*This file is part of Socks via HTTP.This package is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2 of the License, or(at your option) any later version.Socks via HTTP is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with Socks via HTTP; if not, write to the Free SoftwareFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*/// Title :        ThreadCommunication.java// Version :      0.40// Copyright :    Copyright (c) 2001// Author :       Florent CUETO (fcueto@wanadoo.fr)// Description :  Communication between socks via HTTP client & the applicationpackage socks4;import java.net.*;import java.io.*;import java.util.zip.*;public class ThreadCommunication extends Thread{  public static final int PRIMARY_DELAY = 1500;  public static final int DELAY = 20;  public static final int CONNECTION_TIMEOUT = 180000; // 3mn  private String servlet_url = null;  private Connection m_source = null;  private URL m_url_communication = null;  private String id_conn = null;  private String m_destination = null;  private boolean initOk = false;  private String m_proxyUser = null;  private String m_proxyPassword = null;  private String m_httpServerUser = null;  private String m_httpServerPassword = null;  public ThreadCommunication(Connection source, String viaUrl, String proxyUser, String proxyPassword, String httpServerUser, String httpServerPassword)  {    m_source = source;    servlet_url = viaUrl;    m_proxyUser = proxyUser;    m_proxyPassword = proxyPassword;    m_httpServerUser = httpServerUser;    m_httpServerPassword = httpServerPassword;    try    {      m_url_communication = new URL(servlet_url);    }    catch(MalformedURLException e)    {      Log.printLog("MalformedURLException : " + e);    }    // Get the destination    try    {      Thread.sleep(PRIMARY_DELAY);    }    catch (Exception e){}    SocksPacket reqPacket = new SocksPacket(m_source.read());    if (reqPacket.version != 4)    {      Log.printLog("SOCKS version " + reqPacket.version + " not supported. Closing connection.");      return;    }    if (reqPacket.command == 2)    {      Log.printLog("BIND command not supported yet. Closing connection.");      return;    }    if (reqPacket.dnsName != null)    {      // SOCKS 4A      m_destination = reqPacket.dnsName + ":" + reqPacket.destPort;    }    else    {      // SOCKS 4      m_destination = reqPacket.destIP + ":" + reqPacket.destPort;    }    // Create a connection on the server    DataPacket dataPacket = new DataPacket();    dataPacket.type = Const.CONNECTION_CREATE;    dataPacket.id = m_httpServerUser + ":" + m_httpServerPassword + ":" + CONNECTION_TIMEOUT;    dataPacket.tab = m_destination.getBytes();    // Send the connection    HttpMessage mess = new HttpMessage(m_url_communication);    InputStream is = null;    ObjectInputStream ois = null;    int type = Const.CONNECTION_UNSPECIFIED_TYPE;    String err = null;    try    {      if (m_proxyUser != null)      {        // Set the proxy authorization        mess.setProxyAuthorization(m_proxyUser, m_proxyPassword);      }      // Send the object and get the inputstream      is = mess.sendGZippedPostMessage(dataPacket);      // Create the GZIPInputStream      GZIPInputStream zis = new GZIPInputStream(is);      // Create the ObjectInputStream      ois = new ObjectInputStream(zis);      DataPacket response = (DataPacket)ois.readObject();      ois.close();      type = response.type;      id_conn = response.id;      err = new String(response.tab);    }    catch(Exception e)    {      Log.printLog("Exception : " + e);    }    if (type == Const.CONNECTION_CREATE_OK)    {      initOk = true;      //System.out.println("ThreadCommunication created to " + m_destination + " via " + servlet_url + "...");      Log.printLog(id_conn + " <<");      // Send the response packet to the socks client      SocksPacket replyPacket = new SocksPacket();      replyPacket.version = SocksPacket.SOCKS4_REPLY_VERSION;      replyPacket.command = SocksPacket.SOCKS4_OK;      /*replyPacket.destPort = reqPacket.destPort;      replyPacket.destIP = reqPacket.destIP;*/      String[] resp = ServletSocks.stringSplit(err, ":", false);      replyPacket.destIP = resp[0];      replyPacket.destPort = Integer.parseInt(resp[1]);      /*Log.printLog("destIP : " + resp[0]);      Log.printLog("destPort : " + resp[1]);*/      m_source.write(replyPacket.toBytes());    }    else    {      //Log.printLog("ThreadCommunication refused to " + m_destination + " via " + servlet_url + "...");      Log.printLog(err);      // Send the response packet to the socks client      SocksPacket replyPacket = new SocksPacket();      replyPacket.version = SocksPacket.SOCKS4_REPLY_VERSION;      replyPacket.command = SocksPacket.SOCKS4_KO;      replyPacket.destPort = reqPacket.destPort;      replyPacket.destIP = reqPacket.destIP;      m_source.write(replyPacket.toBytes());    }  }  // Main task  public void run()  {    if (!initOk)    {      m_source.disconnect();      return;    }    boolean state = true;    byte[] line;    while (state == true)    {      try      {        line = m_source.read();        DataPacket dataPacket = new DataPacket();        if (line == null)        {          // Connection closed          dataPacket.type = Const.CONNECTION_DESTROY;          dataPacket.id = id_conn;          dataPacket.tab = Const.TAB_EMPTY;        }        else        {          dataPacket.type = Const.CONNECTION_REQUEST;          dataPacket.id = id_conn;          dataPacket.tab = line;          if (line.length > 0)          {            //System.out.println(id_conn + " ->");            //System.out.println(new String(line));          }        }        // Send the message        HttpMessage mess = new HttpMessage(m_url_communication);        InputStream is = null;        ObjectInputStream ois = null;        if (m_proxyUser != null)        {          // Set the proxy authorization          mess.setProxyAuthorization(m_proxyUser, m_proxyPassword);        }        // Create the InputStream        is = mess.sendGZippedPostMessage(dataPacket);        // Create the GZIPInputStream        GZIPInputStream zis = new GZIPInputStream(is);        // Create the ObjectInputStream        ois = new ObjectInputStream(zis);        DataPacket response = (DataPacket)ois.readObject();        ois.close();        // Write the received bytes        switch (response.type)        {          case Const.CONNECTION_RESPONSE:            if (response.tab.length > 0)            {              //System.out.println(response.id + " <-");              //System.out.println(new String(response.tab));            }            m_source.write(response.tab);            break;          case Const.CONNECTION_NOT_FOUND:            Log.printLog("HTTP Server said : Connection id not found : " + id_conn);            break;          case Const.CONNECTION_DESTROY_OK:            Log.printLog("HTTP Server said : Connection closed : " + id_conn);            break;          default:            Log.printLog("HTTP Server sent an unexpected response type : " + response.type);            break;        }        // Sleep        Thread.sleep(DELAY);        // If the connection has been closed        if (response.isConnClosed)        {          // Log          //System.out.println("Connexion closed by remote server.");          Log.printLog(response.id + " >>");          // Tell the server to destroy the connection          /*dataPacket = new DataPacket();          dataPacket.type = Const.CONNECTION_DESTROY;          dataPacket.id = id_conn;          dataPacket.tab = Const.TAB_EMPTY;*/          // Close the source connection          m_source.disconnect();          // Stop the thread          state = false;        }        if (response.type == Const.CONNECTION_DESTROY_OK)        {          // Close the source connection          m_source.disconnect();          // Stop the thread          state = false;        }        if (response.type == Const.CONNECTION_NOT_FOUND)        {          // Close the source connection          m_source.disconnect();          // Stop the thread          state = false;        }      }      catch (Exception e)      {        Log.printLog("Exception : " + e);      }    }  }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
av亚洲产国偷v产偷v自拍| 国产在线不卡视频| 国产精品伦理一区二区| 精品欧美久久久| 精品国产伦理网| 日韩免费看网站| 26uuu国产在线精品一区二区| 精品国精品自拍自在线| 亚洲精品一区二区在线观看| 精品日韩成人av| 国产女人18毛片水真多成人如厕| 欧美高清在线精品一区| 中文字幕亚洲电影| 一区二区三区欧美在线观看| 亚洲综合激情小说| 视频在线观看一区| 国产一本一道久久香蕉| jlzzjlzz国产精品久久| 欧美亚洲尤物久久| 欧美电影免费观看高清完整版在 | 91久久精品一区二区三| 一本一道综合狠狠老| 3atv一区二区三区| 国产欧美日韩另类一区| 亚洲特级片在线| 日韩电影在线看| 成人理论电影网| 欧美日韩国产区一| 久久中文娱乐网| 亚洲一区二区三区不卡国产欧美| 蜜桃视频一区二区三区| 成人99免费视频| 这里只有精品99re| 亚洲同性同志一二三专区| 亚洲成人tv网| jlzzjlzz欧美大全| 欧美大黄免费观看| 亚洲日本在线天堂| 激情综合网天天干| 欧美日韩视频在线观看一区二区三区| 精品国产欧美一区二区| 一卡二卡三卡日韩欧美| 高清在线成人网| 欧美一区二区视频在线观看| 国产精品对白交换视频 | 日韩午夜精品电影| 亚洲精品视频一区二区| 狠狠色狠狠色合久久伊人| 色婷婷一区二区三区四区| 精品国免费一区二区三区| 亚洲福利一区二区三区| aaa亚洲精品| 国产女主播视频一区二区| 免费成人美女在线观看.| 在线观看一区二区视频| 国产精品福利av| 国产jizzjizz一区二区| xf在线a精品一区二区视频网站| 亚洲一区中文日韩| 91色乱码一区二区三区| 日本一区二区电影| 国产精一品亚洲二区在线视频| 欧美一级二级三级蜜桃| 亚洲免费在线观看视频| 成人a级免费电影| 欧美激情资源网| 成人一区二区三区视频在线观看 | 国产成人精品网址| 久久―日本道色综合久久| 免费xxxx性欧美18vr| 91精品黄色片免费大全| 亚洲成av人片一区二区梦乃| 日本高清不卡aⅴ免费网站| ㊣最新国产の精品bt伙计久久| 高清视频一区二区| 中文字幕在线不卡一区二区三区| 国产99久久久国产精品潘金网站| 日韩精品一区二区三区视频 | 欧美三级蜜桃2在线观看| 亚洲精品国产精品乱码不99| 91色九色蝌蚪| 亚洲123区在线观看| 538在线一区二区精品国产| 美女尤物国产一区| 久久精品亚洲一区二区三区浴池| 国产精品18久久久久久久久久久久 | 欧美视频在线一区| 午夜影院在线观看欧美| 欧美精品高清视频| 精品午夜一区二区三区在线观看| 精品国内二区三区| av电影在线观看一区| 亚洲猫色日本管| 欧美日韩一二区| 美女性感视频久久| 中文字幕不卡三区| 91久久精品日日躁夜夜躁欧美| 亚洲国产欧美一区二区三区丁香婷| 欧美久久久久久久久中文字幕| 麻豆精品蜜桃视频网站| 国产精品女同一区二区三区| 91成人免费在线| 蜜臀va亚洲va欧美va天堂| 国产亚洲成aⅴ人片在线观看| 91在线一区二区三区| 亚洲成a人片综合在线| 精品久久99ma| 一本久久综合亚洲鲁鲁五月天 | 亚洲卡通动漫在线| 日韩三级在线免费观看| 成人午夜激情片| 视频一区二区国产| 中文字幕不卡的av| 欧美一区午夜精品| 99精品视频中文字幕| 麻豆精品新av中文字幕| 亚洲精品国产一区二区三区四区在线 | 99国产精品99久久久久久| 亚洲一区二区三区四区在线观看| 欧美成人精品1314www| 色综合久久中文字幕综合网| 久热成人在线视频| 一区二区三区中文字幕电影 | 国产精品人妖ts系列视频| 欧美丝袜第三区| www.久久久久久久久| 青青草原综合久久大伊人精品| 亚洲同性gay激情无套| 国产欧美综合在线| 欧美一区二区性放荡片| 在线影院国内精品| 成人h动漫精品| 国产乱国产乱300精品| 精品一区二区三区久久久| 性感美女久久精品| 亚洲一区二区三区四区在线 | 久久精品国产一区二区三| 亚洲一二三级电影| 亚洲另类色综合网站| 国产精品久久久久国产精品日日| 亚洲精品在线电影| 精品久久人人做人人爰| 88在线观看91蜜桃国自产| 色欧美片视频在线观看在线视频| 国产成+人+日韩+欧美+亚洲| 久久精品久久久精品美女| 日韩在线一区二区三区| 天天影视网天天综合色在线播放| 国产精品高潮呻吟| 一区在线观看免费| 亚洲欧美日本在线| 亚洲欧美成aⅴ人在线观看 | 91美女片黄在线观看| 东方aⅴ免费观看久久av| 国产一区中文字幕| 国产精品一区二区久久精品爱涩| 国产一区二区三区免费播放| 狠狠色综合日日| 国产精品中文字幕一区二区三区| 精品在线视频一区| 国产成人丝袜美腿| 91免费看`日韩一区二区| 色综合久久九月婷婷色综合| 欧美在线免费视屏| 91精品婷婷国产综合久久性色| 91精品免费在线观看| 日韩精品一区在线| 国产亚洲福利社区一区| 中文字幕一区二区日韩精品绯色| 最新欧美精品一区二区三区| 亚洲黄色免费网站| 奇米777欧美一区二区| 国产成人丝袜美腿| 色吊一区二区三区| 日韩一区二区三区在线视频| 久久综合色8888| 亚洲卡通动漫在线| 久久av中文字幕片| 成人国产精品免费| 欧美男男青年gay1069videost | 91精品欧美一区二区三区综合在| 精品久久久久久久久久久久久久久久久 | 亚洲欧美一区二区三区极速播放 | 成人黄色av电影| 一本大道久久a久久综合婷婷| 欧美精品成人一区二区三区四区| 精品美女被调教视频大全网站| 亚洲欧美一区二区在线观看| 午夜不卡av免费| 国产福利精品一区二区| 欧美日韩国产电影| 久久精品亚洲一区二区三区浴池| 亚洲综合在线视频| 国产精品亚洲一区二区三区在线 | 国产精品国产三级国产aⅴ中文| 亚洲午夜三级在线| 福利一区福利二区| 538prom精品视频线放| 1000部国产精品成人观看| 美女一区二区视频|