Hi Swati,
ESG does not behave like a (forward) proxy. If it did, it would accept
the initial HTTP/CONNECT. But it refuses. The 405 error response comes
from ESG.
Hence, I guess ESG isnt configured as a forward proxy.
Tobias
Am 08.05.2013 17:02, schrieb Swati Deshpande:
> Hi Tobias,
>
> I followed the steps given by you. I updated AutobahnPython, then
> started server and then started client_with_proxy. However, I am getting
> following errors (My WebSocket client, server and ESG is on same machine
> with ip 10.230.34.143, ESG is receiving requests on port 8081):
> /home/Autobahn/AutobahnPython-master/examples/websocket/echo>python
> client_with_proxy.py ws://
10.230.34.143:9000 <
http://10.230.34.143:9000>
>
10.230.34.143:8081 <
http://10.230.34.143:8081> debug
> 2013-05-08 09:37:25-0500 [-] Log opened.
> 2013-05-08 09:37:25-0500 [-] Starting factory
> <autobahn.websocket.WebSocketClientFactory instance at 0x621a638>
> 2013-05-08 09:37:25-0500 [Uninitialized] connection to
>
10.230.34.143:8081 <
http://10.230.34.143:8081> established
> 2013-05-08 09:37:25-0500 [Uninitialized] CONNECT
10.230.34.143:9000
> <
http://10.230.34.143:9000> HTTP/1.1
> Host: 10.230.34.143
>
>
> 2013-05-08 09:37:25-0500 [Uninitialized] TX Octets to
10.230.34.143:8081
> <
http://10.230.34.143:8081> : sync = False, octets =
> 434f4e4e4543542031302e3233302e33342e3134333a3930303020485454502f312e310d0a486f73743a2031302e3233302e33342e3134330d0a0d0a
> 2013-05-08 09:37:25-0500 [EchoClientProtocol,client] RX Octets from
>
10.230.34.143:8081 <
http://10.230.34.143:8081> : octets =
> 485454502f312e3120343035204d4554484f44204e4f5420414c4c4f5745440d0a436f6e74656e742d4c656e6774683a20300d0a416c6c6f773a204745542c20504f53542c205055542c20484541442c2044454c4554452c204f5054494f4e532c2054524143450d0a0d0a
> 2013-05-08 09:37:25-0500 [EchoClientProtocol,client] received HTTP response:
>
> HTTP/1.1 405 METHOD NOT ALLOWED
> Content-Length: 0
> Allow: GET, POST, PUT, HEAD, DELETE, OPTIONS, TRACE
>
>
>
>
> 2013-05-08 09:37:25-0500 [EchoClientProtocol,client] received HTTP
> status line for proxy connect request : HTTP/1.1 405 METHOD NOT ALLOWED
> 2013-05-08 09:37:25-0500 [EchoClientProtocol,client] received HTTP
> headers for proxy connect request : {'content-length': u'0', 'allow':
> u'GET, POST, PUT, HEAD, DELETE, OPTIONS, TRACE'}
> 2013-05-08 09:37:25-0500 [EchoClientProtocol,client] failing proxy
> connect ('HTTP proxy connect failed (405 - METHODNOTALLOWED)')
> 2013-05-08 09:37:25-0500 [EchoClientProtocol,client] dropping connection
> 2013-05-08 09:37:25-0500 [-] WebSocketProtocol.onClose:
> wasClean=False
> code=1006
> reason=connection was closed uncleanly (None)
> self.closedByMe=False
> self.failedByMe=False
> self.droppedByMe=True
> self.wasClean=False
> self.wasNotCleanReason=None
> self.localCloseCode=None
> self.localCloseReason=None
> self.remoteCloseCode=None
> self.remoteCloseReason=None
>
> 2013-05-08 09:37:25-0500 [-] connection to
10.230.34.143:8081
> <
http://10.230.34.143:8081> lost
> 2013-05-08 09:37:25-0500 [-] Stopping factory
> <autobahn.websocket.WebSocketClientFactory instance at 0x621a638>
> 2013-05-08 09:37:30-0500 [-] skipping onOpenHandshakeTimeout since
> WebSocket connection already closed
>
>
> Can you please let me know what is the issue over here?
>
> Thanks,
> Swati
>
>
> On Wed, May 8, 2013 at 7:06 PM, Tobias Oberstein
> <
tobias.o...@gmail.com <mailto:
tobias.o...@gmail.com>> wrote:
>
> Hi Swati,
>
> ok, I've implemented something. Don't know if it works, since I
> don't have a suitable proxy around. If you want to try, pls do the
> following.
>
> Fetch and install latest Autobahn (on Client and Server):
>
> git clone git://
github.com/tavendo/__AutobahnPython.git
> <
http://github.com/tavendo/AutobahnPython.git>
> cd Autobahn/autobahn
> python setup.py install
>
>
> On Server (192.168.2.50), run:
>
> cd Autobahn/examples/websocket/__echo
> <
http://192.168.1.100:8050>), run:
>
> cd Autobahn/examples/websocket/__echo
> <
http://192.168.2.50:9000>
192.168.1.100:8050
> <
http://192.168.1.100:8050> debug
>
> Tobias
>
>
>
> Am 08.05.2013 07:32, schrieb Swati Deshpande:
>
> Hi Tobias,
>
> Thanks a lot for looking into the issue. I will check your fix
> tomorrow
> and let you know if it works. I need to update AutobahnPython from
>
https://github.com/tavendo/__AutobahnPython
> <mailto:
tobias.oberstein@__
gmail.com
> <mailto:
tobias.o...@gmail.com>>> wrote:
>
> It hasn't yet received any data (and hasn't send
> any also).
> It has
> started a timer ("opening handshake timeout"),
> because it
> is waiting
> Ok. I understand this now. So, Can you please tell me
> why ESG
> does not
> receive any data from testeeclient?
>
>
> Autobahn currently does not implement HTTP/CONNECT which
> apparantly is
> the way it should work in the presence of explicit proxies.
>
> I have described this in this issue I added:
>
https://github.com/tavendo/____AutobahnPython/issues/135
> <
https://github.com/tavendo/__AutobahnPython/issues/135>