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).
Did you test your code proxying your browser traffic? Does it work fine? Why at cb_readsock do you ssh_set_blocking(session, 0);? thank you On Sat, Jan 26, 2019 at 7:59 AM <[email protected]> wrote: > Hi Alberto > > Glad I could help! > > I advice to not use the code in production without having tested it > extensiveley. I did not check for memory leaks. > > If you made any improvements to the code, I would appreciate when you post > them here. > > Cheers, > Till > On 25.01.19 23:46, Alberto Garcia wrote: > > Hi, > > I made your code compile. It is super helpful!! Thank you so much! > > On Fri, Jan 25, 2019 at 11:07 AM Alberto Garcia <[email protected]> > wrote: > >> thanks, >> >> what is the #include "config.h" that you include at the beginning? >> >> Cheers >> >> On Fri, Jan 25, 2019 at 6:26 AM <[email protected]> wrote: >> >>> On 24.01.19 22:09, Alberto Garcia wrote: >>> >>> Can you please post the link to the mentioned code? >>> Thanks >>> >>> Here you go. >>> >>> Till >>> >>> >>> On Thu, Jan 24, 2019, 12:47 PM <[email protected] wrote: >>> >>>> On 24.01.19 21:12, Alberto Garcia wrote: >>>> >>>> > Hi, >>>> > >>>> > How can I read multiple new incoming channels under the same session >>>> > in a libssh server? I need this since when using dynamic port >>>> > forwarding and per every SOCKS5 request it creates a new channel as >>>> > you can see in this log (gotten with -vvv): >>>> > >>>> Have a look at my quick n dirty sample here on the mailing list... I >>>> think i'ts just doing what you need: It accepts forwarding channels. But >>>> it's plain C. >>>> >>>> Till >>>> >>>> >>>> >> >> -- >> Alberto García Illera >> >> GPG Public Key <https://goo.gl/yshdwh> >> > > > -- > Alberto García Illera > > GPG Public Key <https://goo.gl/yshdwh> > > -- Alberto García Illera GPG Public Key <https://goo.gl/yshdwh>
