# hmgle/graftcp

A flexible tool for redirecting a program's TCP, UDP, and DNS traffic to SOCKS5 or HTTP proxies.

Repository: https://github.com/hmgle/graftcp
Canonical: https://ross.abutalabs.com/products/graftcp
Language: C
License: GPL-3.0
License Family: copyleft
Last push: 2026-08-25T08:51:48+00:00

## Health v2 (maintenance only)
Score: 97/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 93, longevity 100
- inputs: {"age_days": 3067, "days_push": 8, "days_rel": 50, "gap_med": 13, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2561, forks 202 (observed 2026-08-28T04:07:00.971539+00:00)

## What it is
graftcp is a Linux command-line tool that redirects TCP, UDP, and DNS traffic of arbitrary processes to SOCKS5 or HTTP proxies using ptrace syscall tracing, without relying on LD_PRELOAD. It works even on statically linked binaries like Go programs, and supports proxy selection modes, blacklists, and embedded DNS-over-TCP forwarding.

## Use cases
- route a program's traffic through a SOCKS5 proxy without configuring it
- proxy statically linked Go binaries that proxychains can't handle
- redirect DNS queries through a proxy to avoid DNS leaks
- force specific processes through an HTTP proxy on Linux
- selectively proxy traffic while blacklisting some IPs to connect direct

## When to choose
- you need to proxy statically linked binaries or programs that ignore LD_PRELOAD
- you want per-process proxying on Linux without a system-wide VPN
- you need UDP and DNS proxying alongside TCP through SOCKS5

## When to avoid
- you need proxying on macOS or Windows, since graftcp is Linux-only
- you want transparent system-wide traffic redirection rather than per-process
- you need a GUI proxy client

## Facets
- artifact type: cli-tool
- maturity: active
- function: proxy, networking, security, cli
- domain: networking, privacy, developer-tools, security
- platform: cli
- tags: socks5, http-proxy, ptrace, proxychains-alternative, dns-proxy, udp-proxy, traffic-redirection, command-line, linux

## Member repositories
- hmgle/graftcp (main) score 97

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:00.971539+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:23:30.294388+00:00, confidence not recorded.
  - readme: https://github.com/hmgle/graftcp (fetched 2026-08-28T04:07:00.971539+00:00, sha 64a9f104281e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
