[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reading multiple channels under the same session
[Thread Prev] | [Thread Next]
- Subject: Re: Reading multiple channels under the same session
- From: Alberto Garcia <agarciaillera@xxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Tue, 29 Jan 2019 14:23:01 -0800
- To: libssh@xxxxxxxxxx
Hi, First of all I want to clarify that I'm doing my tests in Windows so I had to adapt the code to work in it (I modified the minimum possible from your code). I'm worried that the problem may be in the windows support of libssh. I've been able to reproduce in a "consistent" way the crash. I wrote a simple python code that in 5 threads uses the proxy socks to do requests and it crashes immediately. It ALWAYS crashes within cb_readsock but at different places in it which makes me think that is a race condition of some sort which is weird because I'm only threading at ssh_bind_accept(). If there is anything that comes to your mind please let me know. Cheers On Tue, Jan 29, 2019 at 1:51 PM <g4-lisz@xxxxxxxxxxxx> wrote: > Hi Alberto > > On 29.01.19 20:58, Alberto Garcia wrote: > > > Hi Till, > > > > I was finally able to adapt your code to make it work with mine. So > > now I get a channel per every socks connection i'm trying to do and it > > works fine and I can proxy through the session (created with -D). the > > problem that I'm facing is that the proxy doesn't work when used > > proxying the traffic from a web browser. I guess it must be because > > the code is not ready to be used when multiple connections are made at > > the same time (when loading a website JS will trigger a bunch of other > > connections). > > Glad to hear! > > > > > Did you test your code proxying your browser traffic? Does it work fine? > > Yes, this was my test case actually. > > > > > Why at cb_readsock do you ssh_set_blocking(session, 0);? > > Honestly it's been a while since I worked on this code. At the moment > I'm programming some kind of SSH tunneling deamon, so I'm more on the > client side right now... > > I will test my own code again though, and then I let you know. Not sure > about the ssh_set_blocking() ... Probably some testing which I forgot to > remove. > > Cheers, > Till > > > > -- Alberto García Illera GPG Public Key <https://goo.gl/yshdwh>
Re: Reading multiple channels under the same session | g4-lisz@xxxxxxxxxxxx |
Reading multiple channels under the same session | Alberto Garcia <agarciaillera@xxxxxxxxx> |
Re: Reading multiple channels under the same session | g4-lisz@xxxxxxxxxxxx |
Re: Reading multiple channels under the same session | Alberto Garcia <agarciaillera@xxxxxxxxx> |
Re: Reading multiple channels under the same session | g4-lisz@xxxxxxxxxxxx |
Re: Reading multiple channels under the same session | Alberto Garcia <agarciaillera@xxxxxxxxx> |
Re: Reading multiple channels under the same session | Alberto Garcia <agarciaillera@xxxxxxxxx> |
Re: Reading multiple channels under the same session | g4-lisz@xxxxxxxxxxxx |
Re: Reading multiple channels under the same session | Alberto Garcia <agarciaillera@xxxxxxxxx> |
Re: Reading multiple channels under the same session | g4-lisz@xxxxxxxxxxxx |