Skip to content

Commit 7673771

Browse files
committed
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);
1 parent e09615d commit 7673771

File tree

2 files changed

+518
-0
lines changed

2 files changed

+518
-0
lines changed

projects/client/RabbitMQ.Client/RabbitMQ.Client.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@
254254
<Compile Include="src\client\impl\StreamProperties.cs" />
255255
<Compile Include="src\client\impl\SyntaxError.cs" />
256256
<Compile Include="src\client\impl\TcpClientAdapter.cs" />
257+
<Compile Include="src\client\impl\TunneledTcpClient.cs" />
257258
<Compile Include="src\client\impl\UnexpectedFrameException.cs" />
258259
<Compile Include="src\client\impl\UnknownClassOrMethodException.cs" />
259260
<Compile Include="src\client\impl\WireFormatting.cs" />

0 commit comments

Comments
 (0)