WrathChaos/StompClientLib

Can't see any Websocket traffic in Charles Proxy

cleverClosure opened this issue · 2 comments

I can't see any websocket traffic in Charles Proxy for some reason. I see http traffic though. And yes, the app successfully connects via websocket

Solved by pasting this code:

NSMutableDictionary *socksConfig = [(__bridge_transfer NSDictionary*)CFNetworkCopySystemProxySettings() mutableCopy]; id ip = socksConfig[@"HTTPSProxy"]; NSDictionary *proxySocksConfig = @{@"SOCKSProxy" : (ip ?: @"127.0.0.1"), @"SOCKSPort" : @(8889), @"SOCKSEnable" : @(YES)}; CFWriteStreamSetProperty(writeStream, kCFStreamPropertySOCKSProxy, (__bridge CFDictionaryRef)proxySocksConfig); CFReadStreamSetProperty(readStream, kCFStreamPropertySOCKSProxy, (__bridge CFDictionaryRef)proxySocksConfig);

in SRWebsocket.m after line 586

Thank you for sharing @cleverClosure :) I will add this example on the README for Charles Proxy.