mscdex / mscdex/ssh2

[Feature request] support reject with message

Open
#1,222 0 comments 0 reactions 0 assignees View on GitHub

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

image

But I can't throw this message by ssh2.

image
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
image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.