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

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

?? proxyclient.java

?? Light in the box 抓取程序。 使用HttpClient
?? JAVA
字號:
/* * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/ProxyClient.java,v 1.5 2004/12/20 11:39:04 olegk Exp $ * $Revision: 480424 $ * $Date: 2006-11-29 06:56:49 +0100 (Wed, 29 Nov 2006) $ * * ==================================================================== * *  Licensed to the Apache Software Foundation (ASF) under one or more *  contributor license agreements.  See the NOTICE file distributed with *  this work for additional information regarding copyright ownership. *  The ASF licenses this file to You under the Apache License, Version 2.0 *  (the "License"); you may not use this file except in compliance with *  the License.  You may obtain a copy of the License at * *      http://www.apache.org/licenses/LICENSE-2.0 * *  Unless required by applicable law or agreed to in writing, software *  distributed under the License is distributed on an "AS IS" BASIS, *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *  See the License for the specific language governing permissions and *  limitations under the License. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation.  For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */package org.apache.commons.httpclient;import java.io.IOException;import java.net.Socket;import org.apache.commons.httpclient.params.HttpClientParams;import org.apache.commons.httpclient.params.HttpConnectionManagerParams;import org.apache.commons.httpclient.params.HttpParams;/** * A client that provides {@link java.net.Socket sockets} for communicating through HTTP proxies * via the HTTP CONNECT method.  This is primarily needed for non-HTTP protocols that wish to  * communicate via an HTTP proxy. *  * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a> * @author Michael Becke *  * @since 3.0 *  * @version $Revision: 480424 $ */public class ProxyClient {    // ----------------------------------------------------- Instance Variables    /**     * The {@link HttpState HTTP state} associated with this ProxyClient.     */    private HttpState state = new HttpState();        /**     * The {@link HttpClientParams collection of parameters} associated with this ProxyClient.     */    private HttpClientParams params = null;     /**      * The {@link HostConfiguration host configuration} associated with     * the ProxyClient     */    private HostConfiguration hostConfiguration = new HostConfiguration();        /**     * Creates an instance of ProxyClient using default {@link HttpClientParams parameter set}.     *      * @see HttpClientParams     */    public ProxyClient() {        this(new HttpClientParams());    }    /**     * Creates an instance of ProxyClient using the given      * {@link HttpClientParams parameter set}.     *      * @param params The {@link HttpClientParams parameters} to use.     *      * @see HttpClientParams     */    public ProxyClient(HttpClientParams params) {        super();        if (params == null) {            throw new IllegalArgumentException("Params may not be null");          }        this.params = params;    }    // ------------------------------------------------------------- Properties    /**     * Returns {@link HttpState HTTP state} associated with the ProxyClient.     *     * @see #setState(HttpState)     * @return the shared client state     */    public synchronized HttpState getState() {        return state;    }    /**     * Assigns {@link HttpState HTTP state} for the ProxyClient.     *     * @see #getState()     * @param state the new {@link HttpState HTTP state} for the client     */    public synchronized void setState(HttpState state) {        this.state = state;    }    /**     * Returns the {@link HostConfiguration host configuration} associated with the      * ProxyClient.     *      * @return {@link HostConfiguration host configuration}     */    public synchronized HostConfiguration getHostConfiguration() {        return hostConfiguration;    }    /**     * Assigns the {@link HostConfiguration host configuration} to use with the     * ProxyClient.     *      * @param hostConfiguration The {@link HostConfiguration host configuration} to set     */    public synchronized void setHostConfiguration(HostConfiguration hostConfiguration) {        this.hostConfiguration = hostConfiguration;    }    /**     * Returns {@link HttpClientParams HTTP protocol parameters} associated with this ProxyClient.     *      * @see HttpClientParams     */    public synchronized HttpClientParams getParams() {        return this.params;    }    /**     * Assigns {@link HttpClientParams HTTP protocol parameters} for this ProxyClient.     *      * @see HttpClientParams     */    public synchronized void setParams(final HttpClientParams params) {        if (params == null) {            throw new IllegalArgumentException("Parameters may not be null");        }        this.params = params;    }    /**     * Creates a socket that is connected, via the HTTP CONNECT method, to a proxy.     *      * <p>     * Even though HTTP CONNECT proxying is generally used for HTTPS tunneling, the returned     * socket will not have been wrapped in an SSL socket.     * </p>     *      * <p>     * Both the proxy and destination hosts must be set via the      * {@link #getHostConfiguration() host configuration} prior to calling this method.     * </p>     *      * @return the connect response     *      * @throws IOException     * @throws HttpException     *      * @see #getHostConfiguration()     */    public ConnectResponse connect() throws IOException, HttpException {                HostConfiguration hostconf = getHostConfiguration();        if (hostconf.getProxyHost() == null) {            throw new IllegalStateException("proxy host must be configured");        }        if (hostconf.getHost() == null) {            throw new IllegalStateException("destination host must be configured");        }        if (hostconf.getProtocol().isSecure()) {            throw new IllegalStateException("secure protocol socket factory may not be used");        }                ConnectMethod method = new ConnectMethod(getHostConfiguration());        method.getParams().setDefaults(getParams());                DummyConnectionManager connectionManager = new DummyConnectionManager();        connectionManager.setConnectionParams(getParams());                HttpMethodDirector director = new HttpMethodDirector(            connectionManager,            hostconf,            getParams(),            getState()        );                director.executeMethod(method);                ConnectResponse response = new ConnectResponse();        response.setConnectMethod(method);                // only set the socket if the connect was successful        if (method.getStatusCode() == HttpStatus.SC_OK) {            response.setSocket(connectionManager.getConnection().getSocket());        } else {            connectionManager.getConnection().close();        }                return response;    }    /**     * Contains the method used to execute the connect along with the created socket.     */    public static class ConnectResponse {                private ConnectMethod connectMethod;                private Socket socket;                private ConnectResponse() {}                /**         * Gets the method that was used to execute the connect.  This method is useful for          * analyzing the proxy's response when a connect fails.         *          * @return the connectMethod.         */        public ConnectMethod getConnectMethod() {            return connectMethod;        }        /**         * @param connectMethod The connectMethod to set.         */        private void setConnectMethod(ConnectMethod connectMethod) {            this.connectMethod = connectMethod;        }        /**         * Gets the socket connected and authenticated (if appropriate) to the configured         * HTTP proxy, or <code>null</code> if a connection could not be made.  It is the         * responsibility of the user to close this socket when it is no longer needed.         *          * @return the socket.         */        public Socket getSocket() {            return socket;        }        /**         * @param socket The socket to set.         */        private void setSocket(Socket socket) {            this.socket = socket;        }    }        /**     * A connection manager that creates a single connection.  Meant to be used only once.     */    static class DummyConnectionManager implements HttpConnectionManager {        private HttpConnection httpConnection;                private HttpParams connectionParams;                public void closeIdleConnections(long idleTimeout) {        }        public HttpConnection getConnection() {            return httpConnection;        }        public void setConnectionParams(HttpParams httpParams) {            this.connectionParams = httpParams;        }        public HttpConnection getConnectionWithTimeout(            HostConfiguration hostConfiguration, long timeout) {            httpConnection = new HttpConnection(hostConfiguration);            httpConnection.setHttpConnectionManager(this);            httpConnection.getParams().setDefaults(connectionParams);            return httpConnection;        }                        /**         * @deprecated         */        public HttpConnection getConnection(HostConfiguration hostConfiguration, long timeout)            throws HttpException {            return getConnectionWithTimeout(hostConfiguration, timeout);        }                public HttpConnection getConnection(HostConfiguration hostConfiguration) {            return getConnectionWithTimeout(hostConfiguration, -1);        }            public void releaseConnection(HttpConnection conn) {        }        public HttpConnectionManagerParams getParams() {            return null;        }        public void setParams(HttpConnectionManagerParams params) {        }    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产在线国偷精品免费看| 欧美日韩中文字幕一区| 在线视频国内一区二区| 久久女同精品一区二区| 亚洲第一福利视频在线| 成人污视频在线观看| 欧美一区二区在线播放| 亚洲九九爱视频| 国产成人综合亚洲91猫咪| 91精品国产综合久久福利 | 91一区二区在线观看| 91精品国产综合久久久蜜臀图片 | eeuss鲁片一区二区三区在线观看| 欧美顶级少妇做爰| 一区二区三区免费| 91丨porny丨蝌蚪视频| 国产日韩av一区| 韩国毛片一区二区三区| 91精品国产综合久久久久久漫画| 伊人一区二区三区| 色呦呦国产精品| 国产精品久久久久久妇女6080| 国产精品中文字幕日韩精品| 亚洲精品一区二区三区99| 美女视频一区二区| 69堂精品视频| 日韩高清电影一区| 宅男在线国产精品| 日本午夜精品一区二区三区电影| 欧美剧情片在线观看| 亚洲va韩国va欧美va| 欧美色老头old∨ideo| 五月天国产精品| 欧美老年两性高潮| 玖玖九九国产精品| 久久亚洲精品国产精品紫薇| 韩国女主播一区| 国产精品美女久久久久久久久久久| 成人免费视频caoporn| 亚洲欧美日韩一区二区 | 91视频在线观看| 国产精品传媒视频| 欧美性受极品xxxx喷水| 日本欧美一区二区三区乱码| 日韩三级.com| 国产成人精品免费视频网站| 亚洲色图在线看| 4438成人网| 国产91清纯白嫩初高中在线观看| 国产日韩av一区二区| 日本韩国精品一区二区在线观看| 午夜电影网一区| 精品免费日韩av| 91首页免费视频| 美国十次了思思久久精品导航| 2020国产精品| 色素色在线综合| 久久国产婷婷国产香蕉| 综合自拍亚洲综合图不卡区| 7777女厕盗摄久久久| 成人午夜视频免费看| 亚洲午夜电影在线观看| 精品sm在线观看| 色8久久人人97超碰香蕉987| 男女激情视频一区| 中文字幕一区在线| 91精品国产综合久久久久久漫画 | 午夜精品免费在线观看| 久久影院午夜论| 日本伦理一区二区| 国产精品亚洲专一区二区三区| 亚洲小少妇裸体bbw| 久久精品免视看| 欧美日本国产一区| 成人免费观看av| 日本美女视频一区二区| 日韩理论片网站| 久久亚洲影视婷婷| 在线播放亚洲一区| 91丨porny丨中文| 国产综合久久久久影院| 丝瓜av网站精品一区二区| 日韩理论片中文av| 久久久久久久久免费| 91麻豆精品国产91久久久使用方法 | 99精品久久只有精品| 久久99国产精品成人| 一区二区欧美国产| 中文字幕精品在线不卡| 精品日韩在线观看| 欧美日韩国产免费一区二区| 日本精品视频一区二区| 大白屁股一区二区视频| 精品一区二区三区视频| 日韩精品乱码免费| 亚洲国产综合人成综合网站| 亚洲美女少妇撒尿| 国产精品不卡一区二区三区| 国产视频亚洲色图| 亚洲精品一区二区三区香蕉| 日韩一区二区在线观看视频| 精品视频1区2区| 欧美性一二三区| 欧美日韩一区久久| 欧美日韩综合色| 欧美三级日本三级少妇99| 91成人国产精品| 色呦呦一区二区三区| 日本福利一区二区| 在线精品亚洲一区二区不卡| 色老头久久综合| 欧美午夜宅男影院| 欧美日韩国产综合草草| 欧美日韩一本到| 制服丝袜中文字幕亚洲| 日韩一级大片在线| 日韩精品在线一区二区| 精品国产免费人成电影在线观看四季| 日韩欧美一区在线观看| 韩国一区二区在线观看| 5566中文字幕一区二区电影| 欧美日韩三级视频| 欧美日韩日本视频| 在线播放欧美女士性生活| 在线成人免费观看| 精品日产卡一卡二卡麻豆| 久久亚洲精华国产精华液| www国产成人| 国产精品网站在线播放| 亚洲精品亚洲人成人网在线播放| 中文字幕日韩一区| 一区二区欧美国产| 午夜欧美2019年伦理| 久久成人免费网站| 九九视频精品免费| 成人精品视频一区| 色狠狠色噜噜噜综合网| 制服丝袜亚洲色图| 日本一区二区综合亚洲| 亚洲精品日韩一| 久久不见久久见免费视频7| 国产成人精品免费网站| 91成人免费网站| 欧美一级片在线| 一区二区三区产品免费精品久久75| 久久久亚洲综合| 国产精品二三区| 日韩成人精品在线观看| 国产真实乱对白精彩久久| 99精品久久久久久| 91精品国产欧美日韩| 国产精品久久久爽爽爽麻豆色哟哟| 亚洲国产精品久久艾草纯爱| 国产乱人伦偷精品视频不卡| 色丁香久综合在线久综合在线观看| 日韩精品一区二区三区中文不卡| 国产精品视频第一区| 日韩福利视频网| 91影院在线观看| 久久久国产精品午夜一区ai换脸| 亚洲国产高清在线观看视频| 亚洲精选一二三| 国产精品69毛片高清亚洲| 欧美日韩一区三区| 国产精品伦一区| 国产一区久久久| 91超碰这里只有精品国产| 综合久久综合久久| 国产精品一区二区三区99| 678五月天丁香亚洲综合网| 亚洲欧美色综合| 东方aⅴ免费观看久久av| 欧美一二三在线| 亚洲午夜免费电影| 成人av电影在线播放| 国产亚洲一区二区三区四区| 天天色综合天天| 欧洲精品一区二区| 日韩毛片在线免费观看| 成人激情校园春色| 久久久久国产精品厨房| 老汉av免费一区二区三区| 欧美精品 日韩| 调教+趴+乳夹+国产+精品| 蜜臀精品久久久久久蜜臀| 欧美视频日韩视频在线观看| 亚洲欧美另类图片小说| 成人美女视频在线观看18| 精品捆绑美女sm三区| 美女性感视频久久| 日韩一区二区免费在线电影| 日日夜夜精品视频免费| 欧美视频日韩视频| 日韩专区中文字幕一区二区| 欧美日韩国产美| 日韩精品1区2区3区| 91精品国产一区二区三区| 五月天亚洲精品| 日韩欧美久久一区| 精品一区二区免费视频|