ForwardedPortRemote not closing the local TCP socket.
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- C#
- Estrellas
- 4.4k
- Forks
- 993
- Merge medio
- 9 d 21 h
- PR fusionados (30 d)
- 1
Descripción
I am using SSH.NET to create a reverse tunnel to a Linux server so that I am able to connect to a VNC server behind a NAT. There is also a monitoring program running that checks whether someone is actually connected to the VNC server. This is checked using the following piece of code:
int clients = IPGlobalProperties
.GetIPGlobalProperties()
.GetActiveTcpConnections()
.Where((c) => c.LocalEndPoint.Port == monitorPort)
.Count();
(monitorPort is 5900, so the port VNC server is listening on)
Using our old reverse tunneling system, this worked fine. But with SSH.NET the amount of clients never decrease. It seems that SSH.NET keeps the socket to the VNC server open forever.
- I can clearly see that when I connect to the VNC server through the tunnel, the amount of clients goes to 1, but when I disconnect the VNC client it never goes back to 0.
- When I connect directly to the VNC server (over LAN, not through the tunnel) the amount of clients does immediately go back to 0 after disconnecting.
- And when I use Plink for the reverse tunnel, the socket also closes immediately after a disconnect from the VNC client.
So I would say that this is a bug in SSH.NET right? The expected behavior would be that the socket closes immediately after the client disconnects.
If you need more info, please let me know. Will have a look at the source code myself tomorrow.
Kind regards,
LJ
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con la implementación de ForwardedPortRemote y reproduce la desconexión de VNC a través del túnel inverso descrita en el issue. Rastrea el ciclo de vida del socket TCP local cuando el cliente VNC se desconecta; se considera terminado cuando el número de conexiones vuelve a cero de inmediato, en consonancia con las conexiones directas y Plink.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- csharp
- Área
- networking
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 40/100