nmap / nmap/nmap

Ncat's proxy connect option should use Nsock proxychains

Open
#2,066 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement Ncat
Dominant language
C
Stars
13.6k
Forks
2.9k
PR merge metrics
No merged PRs in 30d

Description

Ncat currently uses custom proxy connection code in ncat_connect.c. We should replace this with Nsock's proxychains support to keep all such code in one place. Some new features must be added, but we will get more features for Ncat in the process.

Things missing from Nsock that Ncat implements:

  1. Remote name resolution or connect-by-name for proxy types that allow this (HTTP and SOCKS 4a/5 allow these, but Nsock doesn't have a good way currently to handle it).

New features that Ncat will gain by this:

  1. Ability to chain more than one proxy.
  2. More transparent SSL connection capability (was entirely broken, and the fix to #2065 uses nsock_reconnect_ssl() with an IOD converted from a plain socket with nsock_iod_new2(), which the documentation says isn't really supported).

Contributor guide

Open the contributing guide

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 ncat_connect.c and trace the custom proxy connection path alongside Nsock's proxychains support. Determine how remote name resolution or connect-by-name must be represented for HTTP and SOCKS 4a/5 proxies, then verify that proxy chaining and SSL connections work through the unified path.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cli, networking
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.