Java 为什么截击加密我的post请求而不告诉它

Java 为什么截击加密我的post请求而不告诉它,java,android,https,android-volley,Java,Android,Https,Android Volley,我正在尝试登录到使用https的远程地址。 为此,我使用volley发送一个包含用户数据的post请求 这是我的相关代码(包括设置StringRequest->fire StringRequest): } 但是,当运行我的代码时,我可以通过WireShark看到我的数据是使用TLSv1.2加密发送的: No. Time Source Destination Protocol Length Info 11 2.8980

我正在尝试登录到使用https的远程地址。 为此,我使用volley发送一个包含用户数据的post请求

这是我的相关代码(
包括设置StringRequest->fire StringRequest
):

}

但是,当运行我的代码时,我可以通过
WireShark
看到我的数据是使用
TLSv1.2
加密发送的:

No.     Time           Source                Destination           Protocol Length Info
 11 2.898033000    192.168.0.19          80.190.158.9          TCP      74     57186 > https [SYN] Seq=0 Win=29200 Len=0 MSS=1460 SACK_PERM=1 TSval=11207479 TSecr=0 WS=128
 12 2.929011000    80.190.158.9          192.168.0.19          TCP      74     https > 57186 [SYN, ACK] Seq=0 Ack=1 Win=14480 Len=0 MSS=1460 SACK_PERM=1 TSval=210621220 TSecr=11207479 WS=128
 13 2.929044000    192.168.0.19          80.190.158.9          TCP      66     57186 > https [ACK] Seq=1 Ack=1 Win=29312 Len=0 TSval=11207487 TSecr=210621220
 14 2.930506000    192.168.0.19          80.190.158.9          TLSv1.2  284    Client Hello
 15 2.959979000    80.190.158.9          192.168.0.19          TCP      66     https > 57186 [ACK] Seq=1 Ack=219 Win=15616 Len=0 TSval=210621228 TSecr=11207487
 16 2.964700000    80.190.158.9          192.168.0.19          TLSv1.2  1514   Server Hello
 17 2.964742000    192.168.0.19          80.190.158.9          TCP      66     57186 > https [ACK] Seq=219 Ack=1449 Win=32128 Len=0 TSval=11207496 TSecr=210621229
 18 2.967946000    80.190.158.9          192.168.0.19          TLSv1.2  1725   Certificate
 19 2.967997000    192.168.0.19          80.190.158.9          TCP      66     57186 > https [ACK] Seq=219 Ack=3108 Win=35456 Len=0 TSval=11207496 TSecr=210621229
 20 2.993710000    192.168.0.19          80.190.158.9          TLSv1.2  192    Client Key Exchange, Change Cipher Spec, Encrypted Handshake Message
 21 3.027476000    80.190.158.9          192.168.0.19          TLSv1.2  324    New Session Ticket, Change Cipher Spec, Encrypted Handshake Message
 22 3.030701000    192.168.0.19          80.190.158.9          TLSv1.2  471    Application Data
 23 3.107383000    80.190.158.9          192.168.0.19          TCP      66     https > 57186 [ACK] Seq=3366 Ack=750 Win=16640 Len=0 TSval=210621265 TSecr=11207512
 35 3.194115000    80.190.158.9          192.168.0.19          TCP      1514   [TCP segment of a reassembled PDU]
 36 3.195622000    80.190.158.9          192.168.0.19          TLSv1.2  6488   Application Data
 37 3.195653000    192.168.0.19          80.190.158.9          TCP      66     57186 > https [ACK] Seq=750 Ack=11236 Win=54144 Len=0 TSval=11207553 TSecr=210621286
535 63.283062000   80.190.158.9          192.168.0.19          TLSv1.2  97     Encrypted Alert
536 63.283534000   80.190.158.9          192.168.0.19          TCP      66     https > 57186 [FIN, ACK] Seq=11267 Ack=750 Win=16640 Len=0 TSval=210636286 TSecr=11207553
537 63.320615000   192.168.0.19          80.190.158.9          TCP      66     57186 > https [ACK] Seq=750 Ack=11268 Win=54144 Len=0 TSval=11222585 TSecr=210636286
关于
上的许多其他问题,因此
我可以看出,在创建
newRequestQueue
时,每个人都必须通过
SSLSocketFactory
。然而,虽然这听起来绝对合乎逻辑,但我想知道为什么我的程序在默认情况下会这样做,因为我没有添加任何
SSLSocketFactory
。我想知道我是否有一个比其他用户更新的版本的截击,当问问题时,所以在过去。但是,在查看时,当使用自动将
SSLSocketFactory
分配给
RequestQueue
https url
时,我无法找到任何检测。 希望有人能对我的问题有所了解

添加

只有
SSLSocketFactory
我能找到的相关资料在
hurstack.class
中:

构造函数:

public HurlStack(UrlRewriter urlRewriter, SSLSocketFactory sslSocketFactory) {
    mUrlRewriter = urlRewriter;
    mSslSocketFactory = sslSocketFactory;
}
    // use caller-provided custom SslSocketFactory, if any, for HTTPS
    if ("https".equals(url.getProtocol()) && mSslSocketFactory != null) {
        ((HttpsURLConnection)connection).setSSLSocketFactory(mSslSocketFactory);
    }
如果SSLSocketFactory通过评估:

public HurlStack(UrlRewriter urlRewriter, SSLSocketFactory sslSocketFactory) {
    mUrlRewriter = urlRewriter;
    mSslSocketFactory = sslSocketFactory;
}
    // use caller-provided custom SslSocketFactory, if any, for HTTPS
    if ("https".equals(url.getProtocol()) && mSslSocketFactory != null) {
        ((HttpsURLConnection)connection).setSSLSocketFactory(mSslSocketFactory);
    }

所以在我的例子中,
“https”.equals(url.getProtocol())
将计算为true,但是
mSslSocketFactory!=空值
将不会

这与插座工厂没有任何关系。您已经指定了
HTTPS
,您得到了指定的
HTTPS

,您的意思是因为我提供了一个HTTPS地址?如果是这样,是谁因为我指定了https而向我发送https?操作系统,截击还是其他什么?你能更准确地回答这个问题吗?我不知道比我问之前知道的更多。到目前为止,有什么答案吗?