[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Have socks proxy working with libssh


Hi,

It's me again,

I've been trying for days to make this work, I've read OpenSSH code to see
how are they handling it... but still I don't know how to implement this
with libssh. I'm not asking to get the code to make it work but a guideness
on how SOCKS5 works with libssh and some hints about which APIs should I
used.

I've found this old stackoverflow post (
https://stackoverflow.com/questions/19654941/dynamic-port-forwarding-libssh-c)
in where someone is trying to do the same thing but the respones doesn't
have any indications about how to implement it using libssh.

Can you please help me with this?

On Fri, Jan 18, 2019 at 11:01 AM Alberto Garcia <agarciaillera@xxxxxxxxx>
wrote:

> Hi,
>
> Andreas can you bring some light in this?
>
> Thank you
>
> On Wed, Jan 16, 2019 at 12:58 PM Alberto Garcia <agarciaillera@xxxxxxxxx>
> wrote:
>
>> Hi,
>> Just to clarify what I really want is to implement dynamic port
>> forwarding in my libssh server.
>>
>> Is there any documentation to achieve that?
>>
>> On Wed, Jan 16, 2019 at 12:05 PM Alberto Garcia <agarciaillera@xxxxxxxxx>
>> wrote:
>>
>>> Hi,
>>>
>>> I have a tool that makes use of libssh and creates a server and a
>>> client. The server listens at port 1234 and the client does a reverse
>>> connection to a OpenSSH server. I can see in the OpenSSH server the
>>> connection and I can do ssh localhost -p [port] being port whatever port
>>> binded by the client and it works fine. I get a shell.
>>>
>>> the problem is that using that tunnel as a SOCKS proxy doing  ssh -p
>>> [port] -D 0.0.0.0:11223 localhost does not work. It does create a
>>> listening socket at port 11223 but when I set that port and IP on my
>>> browser to browse the internet it does not work.
>>>
>>>
>>> What should I add to my code to the libssh server so I can get SOCKS
>>> features?
>>>
>>> Thank you
>>>
>>> --
>>> 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>
>


-- 
Alberto García Illera

GPG Public Key <https://goo.gl/yshdwh>

Follow-Ups:
Re: Have socks proxy working with libsshg4-lisz@xxxxxxxxxxxx
References:
Have socks proxy working with libsshAlberto Garcia <agarciaillera@xxxxxxxxx>
Re: Have socks proxy working with libsshAlberto Garcia <agarciaillera@xxxxxxxxx>
Re: Have socks proxy working with libsshAlberto Garcia <agarciaillera@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org