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

Re: 回复:HOW to use ssh_channel_open_reverse_forward function to implement a reverse tunnel?


On Wednesday, 8 April 2020 17:21:44 CEST 刘元哲 wrote:
> Re-Update:
> After compared the different result
> between ssh_message_global_request_reply_success
> before ssh_channel_open_reverse_forward or after it
 I
> found ssh_channel_listen_forward want a reply, so if I reply it
> immediately, the ssh client then said "ssh_global_request: Global request
> tcpip-forward success"and  can't
> receive ssh_channel_open_reverse_forward request. Otherwise if I
> choose to reply it after ssh_channel_open_reverse_forward,
> the  ssh_channel_listen_forward will hang there, continue wait
> for the  reply.

I've never used that code, we don't have example code nor a test for it. So as 
always I would argue: Untested code is broken code.

I think we need to implement a test to actually fix the code. However I don't 
have time for this. Contributions in this area are very welcome.

See the server testing code Anderson implemented for a start.


Best regards,


	Andreas

-- 
Andreas Schneider                 asn@xxxxxxxxxxxxxx
GPG-ID:     8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D



Archive administrator: postmaster@lists.cynapses.org