Crossbar球童反向代理

时间:2016-02-08 14:07:38

标签: proxy reverse-proxy crossbar caddy caddyfile

我如何设置一个与交叉路由器说话的球童的反向代理?

我有一个带有crossbar路由器的docker,可以监听localhost 8080,我使用caddy作为反向代理。

在Caddyfile下面:

variable_1  location_details;

' tcpflow 8080'当我尝试连接时什么都不返回。

Chrome标题下方

RESPONSE

`0.0.0.0:80
 proxy /ws localhost:8080{
     proxy_header Connection {>Connection}
     proxy_heade Upgrade {>Upgrade}
 }
 header /ws {
     Upgrade "WebSoket"
     Connection "Upgrade"
 }`

REQUEST

HTTP/1.1 101 Switching Protocols
Connection: Upgrade
Sec-Websocket-Accept: r/PdCQJibmcb5XrfVbnSXJMuf9g=
Sec-Websocket-Protocol: wamp.2.json
Server: Caddy
Server: Crossbar/0.11.1
Upgrade: WebSocket
X-Powered-By: AutobahnPython/0.10.9
Date: Tue, 09 Feb 2016 14:12:04 GMT

框架下方:

GET ws://78.46.244.23/ws HTTP/1.1
Host: 78.46.244.23
Connection: Upgrade
Pragma: no-cache
Cache-Control: no-cache
Upgrade: websocket
Origin: chrome://newtab
Sec-WebSocket-Version: 13
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTM 
   like Gecko) Chrome/48.0.2564.103 Safari/537.36
Accept-Encoding: gzip, deflate, sdch
Accept-Language: it-IT,it;q=0.8,en-US;q=0.6,en;q=0.4
Sec-WebSocket-Key: OaEUxWnqjZWyfLypeYxeXw==
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
Sec-WebSocket-Protocol: wamp.2.json

控制台错误:

[1,"realm1",{"roles":{"caller":{"features":{"caller_identification":true,"progressive_call_results":true}},"callee":{"features":{"progressive_call_results":true}},"publisher":{"features":{"subscriber_blackwhite_listing":true,"publisher_exclusion":true,"publisher_identification":true}},"subscriber":{"features":{"publisher_identification":true}}}}]

1 个答案:

答案 0 :(得分:0)

你的Caddy文件中有拼写错误:

Upgrade "WebSoket"