Skip to content

shrpx front-end proxy error: decryption_failed(21). #124

Description

@zwChan

image
(get the file from http://pan.baidu.com/s/1mgNx5Mg)

I use shrpx as a front-end proxy, connect to another spdy proxy. But encounter a error of decryption_failed(21). I try google a lot, but there so few material for reading.
The backend server "106.187.39.217,443" is a spdy proxy, and it work OK if I use it in a pac-file on Chrome.

I know not much about openssl, but I make the crt-file by openssl using the following command.
openssl genrsa -out ca.key 1024
openssl req -new -key ca.key -out ca.csr
openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crt

The shrpx option used:
src/shrpx -p --backend=106.187.39.217,443 --frontend=0.0.0.0,8808 --log-level=INFO --insecure --cacert=/etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt --client-private-key-file=/etc/pki/CA/private/ca.key --client-cert-file=/etc/pki/CA/certs/ca.crt --tls-proto-list=TLSv1.0

It seems no error in the log:

[INFO] Resolving backend address
(shrpx.cc:1183)
[INFO] Address resolution for 106.187.39.217 succeeded: 106.187.39.217
(shrpx.cc:105)
[INFO] Unable to get IPv6 address for 0.0.0.0: Address family for hostname not supported
(shrpx.cc:148)
[INFO] Listening on 0.0.0.0, port 8808
(shrpx.cc:186)
[INFO] Entering event loop
(shrpx.cc:299)
[INFO] [LISTEN:0x1000260] Accepted connection. fd=9
(shrpx_listen_handler.cc:101)
[INFO] [UPSTREAM:0xfe3a00] HTTP request started
(shrpx_https_upstream.cc:78)
[INFO] [UPSTREAM:0xfe3a00] HTTP request headers completed
(shrpx_https_upstream.cc:135)
[INFO] [UPSTREAM:0xfe3a00] HTTP request headers
CONNECT clients4.google.com:443 HTTP/1.1
Host: clients4.google.com
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36

   (shrpx_https_upstream.cc:156)

[INFO] [CLIENT_HANDLER:0xfd5dd0] Downstream connection pool is empty. Create new one
(shrpx_client_handler.cc:309)
[INFO] [DCONN:0xfbd720] Attaching to DOWNSTREAM:0xfd6070
(shrpx_spdy_downstream_connection.cc:101)
[INFO] [UPSTREAM:0xfe3a00] Downstream output buffer is full
(shrpx_https_upstream.cc:311)
[INFO] [DSPDY:0xfd6130] Connecting to downstream server
(shrpx_spdy_session.cc:393)
[INFO] [DSPDY:0xfd6130] Connection established
(shrpx_spdy_session.cc:249)
[INFO] [DSPDY:0xfd6130] Negotiated next protocol:
(shrpx_spdy_session.cc:1049)
[INFO] [DSPDY:0xfd6130] Disconnecting
(shrpx_spdy_session.cc:72)
[INFO] [DSPDY:0xfd6130] Closing fd=10
(shrpx_spdy_session.cc:103)
[INFO] [CLIENT_HANDLER:0xfd5dd0] Deleting
(shrpx_client_handler.cc:173)
[INFO] [DOWNSTREAM:0xfd6070] Deleting
(shrpx_downstream.cc:67)
[INFO] [DCONN:0xfbd720] Deleting
(shrpx_spdy_downstream_connection.cc:59)
[INFO] [DCONN:0xfbd720] Deleted
(shrpx_spdy_downstream_connection.cc:76)
[INFO] [DOWNSTREAM:0xfd6070] Deleted
(shrpx_downstream.cc:77)
[INFO] [CLIENT_HANDLER:0xfd5dd0] Deleted
(shrpx_client_handler.cc:202)
[INFO] [LISTEN:0x1000260] Accepted connection. fd=9
(shrpx_listen_handler.cc:101)

[INFO] [CLIENT_HANDLER:0xfd5dd0] EOF
(shrpx_client_handler.cc:83)
[INFO] [CLIENT_HANDLER:0xfd5dd0] Deleting
(shrpx_client_handler.cc:173)
[INFO] [CLIENT_HANDLER:0xfd5dd0] Deleted
(shrpx_client_handler.cc:202)
[INFO] [LISTEN:0x1000260] Accepted connection. fd=9
(shrpx_listen_handler.cc:101)
[INFO] [UPSTREAM:0x101d470] HTTP request started
(shrpx_https_upstream.cc:78)
[INFO] [UPSTREAM:0x101d470] HTTP request headers completed
(shrpx_https_upstream.cc:135)
[INFO] [UPSTREAM:0x101d470] HTTP request headers
GET http://www.baidu.com/ HTTP/1.1
Host: www.baidu.com
Proxy-Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36
Accept-Encoding: gzip,deflate,sdch
Accept-Language: zh-CN,zh;q=0.8
Cookie: BAIDUID=1BA2C2A8FF4226E396526FE4BE6B740E:FG=1; BAIDUPSID=1BA2C2A8FF4226E396526FE4BE6B740E; BD_HOME=0; H_PS_PSSID=10382_1444_10571_10211_10501_10496_10753_10646_10459_10219_10687_10356_10666_10596_10096_10657_10443_10699_10403_10360_10617_10702_10627; BD_UPN=1b314353

   (shrpx_https_upstream.cc:156)

[INFO] [CLIENT_HANDLER:0xfd5dd0] Downstream connection pool is empty. Create new one
(shrpx_client_handler.cc:309)
[INFO] [DCONN:0xf2f400] Attaching to DOWNSTREAM:0xfed6c0
(shrpx_spdy_downstream_connection.cc:101)
[INFO] [UPSTREAM:0x101d470] HTTP request completed
(shrpx_https_upstream.cc:227)
[INFO] [DSPDY:0xfd6130] Connecting to downstream server
(shrpx_spdy_session.cc:393)
[INFO] [LISTEN:0x1000260] Accepted connection. fd=11
(shrpx_listen_handler.cc:101)
[INFO] [UPSTREAM:0x10177f0] HTTP request started
(shrpx_https_upstream.cc:78)
[INFO] [UPSTREAM:0x10177f0] HTTP request headers completed
(shrpx_https_upstream.cc:135)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions