You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add extended tcp client that can tunnel through http proxy via "HTTP CONNECT"-command.
The current implemenation allows you to establish an (secured) connection between an on-premise server behind an (coperate) proxy and an rabbitmq server on your web server.
(It may be required to connect over SSL on port 443. The rabbitmq server must then reroute the tcp traffic to port 5671).
Implemenation was guided by:
- https://github.com/bentonstark/starksoft-aspen/blob/master/Starksoft.Aspen/Proxy/HttpProxyClient.cs
- https://github.com/sta/websocket-sharp/tree/master/websocket-sharp
Remarks:
The code ist still quite rough and could use some polishing.
It should be tested in other environments.
It may not work with every http proxy.
Use: Just override ConnectionFactory.SocketFactory to return new TunneledTcpClient.
mqConnectionfactory.SocketFactory = family => new TunneledTcpClient(family,"proxy.my_company", 8080, mqConfig.ProxyUsername, mqConfig.ProxyPassword);
0 commit comments