https://github.com/TakahikoKawasaki/nv-websocket-client 기반의 Java 클라이언트와 Fiddler를 사용하는 wss : //echo.websocket.org 서버 간의 websocket 통신을 캡처하려고합니다. Proxifier 또는 ProxyCap을 사용하여 클라이언트를 localhost : 8888로 리다이렉션하여 비보안 연결 (ws : //)을들을 수 있습니다. 그러나 TLS를 사용하면 오류가 발생합니다 : The certificate of the peer does not match the expected hostname (echo.websocket.org)
. 클라이언트의 소스 코드를 수정하지 않고 어떻게이 문제를 해결할 수 있습니까? 브라우저 (chrome/firefox)를 사용하면 문제없이 모든 것을 볼 수 있습니다 (Fiddler의 루트 인증서를 신뢰 함).
내가 EricLaw 솔루션을 시도했지만 결과는 동일합니다 : 나는 더 많은 정보와TLS 인증서 불일치 무시
편집를 윈도우 7을 사용하고 있습니다.
//direct connection:
(SocketConnector)mSocket.InetAddress: echo.websocket.org/174.129.224.73
(SocketConnector)mSocket.getLocalSocketAddress: /192.168.0.100:2044
(SSLSession)verify: host=echo.websocket.org
(SSLSession)verify: cipher suite=TLS_RSA_WITH_AES_128_CBC_SHA256
(SSLSession)verify: peer host=echo.websocket.org
(SSLSession)verify: session.toString=[Session-1,
TLS_RSA_WITH_AES_128_CBC_SHA256]
verifyHostName: hostName=echo.websocket.org, pattern=*.websocket.org
VERIFIED!
//proxy+fiddler:
(SocketConnector)mSocket.InetAddress: echo.websocket.org/174.129.224.73
(SocketConnector)mSocket.getLocalSocketAddress: /127.0.0.1:2039
(SSLSession)verify: host=echo.websocket.org
(SSLSession)verify: cipher suite=SSL_NULL_WITH_NULL_NULL
(SSLSession)verify: peer host=null
(SSLSession)verify: session.toString=[Session-1, SSL_NULL_WITH_NULL_NULL]
내부 피들러 :
200 HTTP Tunnel to 174.129.224.73:443 proxifier:5840
가 (CONNECT
헤더SessionID: empty
)에 대한 응답이 없습니다 나는 클라이언트 내부 검증 단계를 인쇄. 나는 또한 Protocols: <client>;ssl3;tls1.0;tls1.1;tls1.2
의 조합을 시도하고 Java cacerts에 FiddlerRoot.cer
을 추가했습니다.
더 많은 아이디어를 부탁드립니다.
편집 2
여러 개의 자바 버전을 설치했고 나는 잘못된 키 저장소에 인증서를 추가했다. 최종 해결책은 실제로 oSession["x-OverrideCertCN"] = "*.websocket.org";
OnBeforeRequest
function + cacert update 안에있었습니다.