[Feature request] support reject with message
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5.8k
- Forks
- 734
- PR merge metrics
- No merged PRs in 30d
Description
When I set up an ssh tunnel and access a non-existent port, I will receive an error with Connection refused
But I can't throw this message by ssh2.
connection.on('tcpip', (accept, reject) => {
reject('some message')
})
maybe it can be fixed in https://github.com/mscdex/ssh2/blob/master/lib/server.js#L548-L562

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in lib/server.js around lines 548-562 and trace the tcpip handler's reject path. Check how the example reject('some message') call is handled, then verify that a rejected request can produce the requested message instead of only the default connection-refused behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100