Jun 25, 2013 at 4:27 PM
Edited Jun 28, 2013 at 12:13 PM
Is the proxy support implemented natively within websocket4net?
The situation I'm in is a bit odd, I'm doing testing on an application that uses Websockets4Net to open a secure web socket with a server which runs on IIS8.
I need to inspect that traffic, but Windows 7 does not natively route WSS/WS traffic trough the OS level proxy which is configured in the INET settings.
What i was planning to do is to patch the current assembly i have with a line that will force the client to route all traffic trough a local proxy i run(either fiddler, or ZAP).
The current code i got is:
public void OpenWebSocket()
this._websocket = new WebSocket(this._config.WS_Server, this._config.WS_SubProtocol, null, customHeaderItems, "", "", WebSocketVersion.None);
this._websocket.Opened += new EventHandler(this.websocket_Opened);
this._websocket.Error += new EventHandler<ErrorEventArgs>(this.websocket_Error);
this._websocket.Closed += new EventHandler(this.websocket_Closed);
this._websocket.MessageReceived += new EventHandler<MessageReceivedEventArgs>(this.websocket_MessageReceived);
this._websocket.DataReceived += new EventHandler<DataReceivedEventArgs>(this.websocket_DataReceived);
this._websocket.EnableAutoSendPing = false;
So I might rephrase the question, is the set proxy method just requires me to set a proxy by giving it the ip:port endpoint, or do i need to implement the entire proxy(HTTP/SOCKS) protocol my self like the examples from the SSCE client show?