Feature request: Provide a way to bind the SSH clients to a local IP
Nessuno ha ancora preso questa issue.
- Lingua principale
- C#
- Stelle
- 4.4k
- Fork
- 993
- Merge medio
- 9g 21h
- PR unite (30g)
- 1
Descrizione
Hi,
Would you consider adding LocalIP (and LocalPort defaulting to 0) property to the ConnectInfo? I have a multi-IP server and need to bind to a particular IP for the SFTP to go thru the firewall.
I know that Socket.Bind is not supported by all target frameworks.
I ended up modifying the ConnectInfo with the two properties, the PasswordConnectionInfo to add the necessary constructors, the Session.SocketConnect to optionally construct an IPEndPoint and the SocketAbstraction.Connect to pass the local EndPoint and do a socket.Bind.
I used FEATURE_SOCKET_SYNC to surround the socket.Bind to make the code compile.
Of course this is a hack for my needs only.
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 ConnectInfo e PasswordConnectionInfo, quindi segui il percorso di connessione attraverso Session.SocketConnect fino a SocketAbstraction.Connect. Esamina in che modo FEATURE_SOCKET_SYNC influisce sul supporto dei socket. Il lavoro è completato quando l’IP locale e LocalPort, con valore predefinito 0, possono essere passati e utilizzati per associare il socket prima della connessione, mantenendo la compilazione dei framework di destinazione supportati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp
- Ambito
- networking
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100