Install httptap on Ubuntu 24.04

Install httptap on Ubuntu 24.04

The httptap is a command line tool for viewing HTTP and HTTPS requests made by command on Linux. By running a command within an isolated network namespace, httptap intercepts and displays the requests without requiring root privileges or making system-wide changes. This tutorial demonstrates how to install httptap on Ubuntu 24.04.

Install httptap

Download tar.gz file from releases page of the httptap repository:

wget -qO httptap.tar.gz https://github.com/monasticacademy/httptap/releases/latest/download/httptap_linux_x86_64.tar.gz

Extract executable to /usr/local/bin directory:

sudo tar xf httptap.tar.gz -C /usr/local/bin httptap

Remove the unneeded archive:

rm -rf httptap.tar.gz

Testing httptap

To monitor HTTP or HTTPS requests made by a command, use:

httptap -- <command>

This runs <command> within an isolated network namespace and captures network traffic. Example:

httptap -- curl -L https://httpbin.org/relative-redirect/1

Output example:

---> GET https://httpbin.org/relative-redirect/1
<--- 302 https://httpbin.org/relative-redirect/1 (0 bytes)
---> GET https://httpbin.org/get
<--- 200 https://httpbin.org/get (288 bytes)
{
  "args": {},
  "headers": {
    "Accept": "*/*",
    "Host": "httpbin.org",
    "User-Agent": "curl/7.81.0",
    "X-Amzn-Trace-Id": "Root=1-6416c45e-47a4828a557d5fca764271d6"
  },
  "origin": "XXX.XXX.XXX.XXX",
  "url": "https://httpbin.org/get"
}

Uninstall httptap

To uninstall httptap, delete the associated file:

sudo rm -rf /usr/local/bin/httptap

Leave a Comment

Cancel reply

Your email address will not be published.