ForwardedPortRemote not closing the local TCP socket.
Nessuno ha ancora preso questa issue.
- Lingua principale
- C#
- Stelle
- 4.4k
- Fork
- 993
- Merge medio
- 9g 21h
- PR unite (30g)
- 1
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con l’implementazione di ForwardedPortRemote e riproduci la disconnessione VNC tramite reverse tunnel descritta nell’issue. Traccia il ciclo di vita del socket TCP locale quando il client VNC si disconnette; il lavoro è completato quando il conteggio delle connessioni torna prontamente a zero, come per le connessioni dirette e Plink.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp
- Ambito
- networking
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 40/100