2017-10-10 7 views
0

내 유스 케이스는 Parse Server에서 SSL 종료로 SSL 종료를 사용합니다. & Parse LiveQuery. 그것이 제대로 websocket에 연결할 수 없기 때문에 나는 haproxy 설정에 붙어있어, 그리고 때만 로컬 (SSLS 종료)에 연결할 때 그것의 작품. iOS에서 테스트되었습니다 (기본 앱 반응).sssl websocket (라이브 쿼리 구문 분석)에 HAProxy가 붙어 있습니다.

이 "모드 TCP"도움이 될 수있는 모드 변경 내 haproxy 설정

global 
    maxconn  50000 
    log   127.0.0.1 local0 
    user  haproxy 
    chroot  /usr/share/haproxy 
    pidfile  /run/haproxy.pid 
    tune.ssl.default-dh-param 2048 
    ssl-default-bind-ciphers ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS 
    ssl-default-bind-options no-sslv3 
    daemon 

defaults 
    log global 
    retries 3 
    mode http 
    stats enable 
    stats uri /stats 
    stats realm Haproxy\ Statistics 
    stats auth xx:xx 
    option forwardfor 
    option http-server-close 
    option httplog 
    option dontlognull 

frontend xxx_web 
    bind *:443 ssl crt /etc/haproxy/certs/xxx.com.pem 
    acl host_api_xxx hdr(host) -i api.xxx.com 
    acl is_websocket hdr(Upgrade) -i websocket 

    reqadd X-Forwarded-Port:\ 443 
    reqadd X-Forwarded-Proto:\ https 
    reqadd X-Forwarded-Scheme:\ https 
    redirect scheme https if !{ ssl_fc } 

    use_backend ws_xxx if is_websocket 
    use_backend api_xxx if host_api_xxx 

backend ws_xxx 
    server ws_xxx 127.0.0.1:7777 check 

backend api_xxx 
    balance roundrobin 
    reqadd X-Forwarded-Port:\ 443 
    reqadd X-Forwarded-Proto:\ https 
    reqadd X-Forwarded-Scheme:\ https 
    server api_xxx 127.0.0.1:7777 check # ssl verify none 

답변